jekyll-spaceship 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2abfd1cf82bdc535d470ecc9e5397dca1e1e82456897fdf7ee2035bb62ae19f4
4
- data.tar.gz: bab5a4df56d4ac49a1f9b2838b9a05d1ef5e720e9a0cb7838cc9db23a0a211a0
3
+ metadata.gz: ca3414a157fe1966031e109e08be4805790638d24fa4f7197bf74fc231b69778
4
+ data.tar.gz: 95b7d289cd489e28c09902ff5b7f6e35229847cab376df5be9bbab3434f4e41f
5
5
  SHA512:
6
- metadata.gz: ddb2c1c75889ada85e605ee06db3f67aa11392c2774d8db3115ced6fafecd4dcdb3d60bef85677502f511926cfaf358227bfe12aad10d622a0726e7e9d3802a2
7
- data.tar.gz: 00c0d8b4656c3c14db2a78742033cb7cb9d0b41d86bce8a45b7f332175ce1ec24a55aa32c3bf811d506b4ba07a354ae391ac46f06f71d2e5a790f0025648eae1
6
+ metadata.gz: 27e7c3291a2994b03b8670a920ff8cb9d8727a1986debc19d1cf1a92989fc651790353cf29811d2cead664bf999fb0cb77ebb676b5af5773192b8d934e3ce90d
7
+ data.tar.gz: fde58815d50920a1c1c9b4c6694b0600e7a02102bd2d86edad24db469487942e9fdad477a70c567afbcd8e527275bc093328b7b0e75627ed0c194247155361d4
data/README.md CHANGED
@@ -64,8 +64,8 @@
64
64
 
65
65
  <div align="center">
66
66
  <h4>
67
- <a href="#requirements">Requirements</a> |
68
67
  <a href="#installation">Install</a> |
68
+ <a href="#configuration">Config</a> |
69
69
  <a href="#usage">Usage</a> |
70
70
  <a href="#credits">Credits</a> |
71
71
  <a href="#license">License</a>
@@ -93,6 +93,7 @@ A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, emoji
93
93
 
94
94
  - [Requirements](#requirements)
95
95
  - [Installation](#installation)
96
+ - [Configuration](#configuration)
96
97
  - [Usage](#usage)
97
98
  - [1. Table Usage](#1-table-usage)
98
99
  - [1.1 Rowspan and Colspan](#rowspan-and-colspan)
@@ -137,6 +138,33 @@ plugins:
137
138
 
138
139
  **💡 Tip:** Note that GitHub Pages runs in `safe` mode and only allows [a set of whitelisted plugins](https://pages.github.com/versions/). To use the gem in GitHub Pages, you need to build locally or use CI (e.g. [travis](https://travis-ci.org/), [github workflow](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow)) and deploy to your `gh-pages` branch. [Click here for more information.](https://jekyllrb.com/docs/continuous-integration/github-actions/) (e.g. [https://github.com/jeffreytse/jekyll-jeffreytse-blog](https://github.com/jeffreytse/jekyll-jeffreytse-blog))
139
140
 
141
+ ## Configuration
142
+
143
+ This plugin runs with the following configuration options by default. Alternative settings for these options can be explicitly specified in the configuration file `_config.yml`.
144
+
145
+ ```yml
146
+ # Where things are
147
+ jekyll-spaceship:
148
+ processors:
149
+ - table-processor
150
+ - mathjax-processor
151
+ - plantuml-processor
152
+ - polyfill-processor
153
+ - video-processor
154
+ - emoji-processor
155
+ mathjax-processor:
156
+ src: //cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
157
+ config:
158
+ tex2jax:
159
+ inlineMath:
160
+ - ['$','$']
161
+ - ['\(','\)']
162
+ plantuml-processor:
163
+ src: http://www.plantuml.com/plantuml/png/
164
+ emoji-processor:
165
+ src: https://github.githubassets.com/images/icons/emoji/
166
+ ```
167
+
140
168
  ## Usage
141
169
 
142
170
  ### 1. Table Usage
@@ -157,7 +157,7 @@ module Jekyll::Spaceship
157
157
  if scope.table.multi_row_cells != cells and scope.table.multi_row_start
158
158
  for i in 0...scope.table.multi_row_cells.count do
159
159
  multi_row_cell = scope.table.multi_row_cells[i]
160
- multi_row_cell.content += " \n#{cells[i].content}"
160
+ multi_row_cell.inner_html += "<br>#{cells[i].inner_html}"
161
161
  end
162
162
  row.remove
163
163
  end
@@ -182,7 +182,7 @@ module Jekyll::Spaceship
182
182
  span_cell = scope.table.span_row_cells[scope.row.col_index]
183
183
  if span_cell and cell.content.match(/^\s*\^{2}/)
184
184
  cell.content = cell.content.gsub(/^\s*\^{2}/, '')
185
- span_cell.content += " \n#{cell.content}"
185
+ span_cell.inner_html += "<br>#{cell.inner_html}"
186
186
  rowspan = span_cell.get_attribute('rowspan') || 1
187
187
  rowspan = rowspan.to_i + 1
188
188
  span_cell.set_attribute('rowspan', "#{rowspan}")
@@ -207,11 +207,12 @@ module Jekyll::Spaceship
207
207
  align += 2
208
208
  end
209
209
 
210
+ # handle text align
211
+ return if align == 0
212
+
210
213
  # handle escape colon
211
214
  cell.content = cell.content.gsub(/\\:/, ':')
212
215
 
213
- # handle text align
214
- return if align == 0
215
216
  style = cell.get_attribute('style')
216
217
  if align == 1
217
218
  align = 'text-align: left'
@@ -234,8 +235,10 @@ module Jekyll::Spaceship
234
235
  cell = data.cell
235
236
  cvter = self.converter('markdown')
236
237
  return if cvter.nil?
237
- content = cell.content.gsub(/(?<!\\)\|/, '\\|')
238
- content = cvter.convert(content.strip)
238
+ content = cell.inner_html
239
+ .gsub(/(?<!\\)\|/, '\\|')
240
+ .gsub(/^\s+|\s+$/, '')
241
+ content = cvter.convert(content)
239
242
  cell.inner_html = Nokogiri::HTML.fragment(content)
240
243
  end
241
244
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Spaceship
5
- VERSION = "0.6.0"
5
+ VERSION = "0.6.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-spaceship
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeffreytse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-26 00:00:00.000000000 Z
11
+ date: 2020-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll