jekyll-spaceship 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/jekyll-spaceship/cores/processor.rb +1 -1
- data/lib/jekyll-spaceship/cores/register.rb +1 -1
- data/lib/jekyll-spaceship/processors/plantuml-processor.rb +1 -1
- data/lib/jekyll-spaceship/processors/table-processor.rb +5 -5
- data/lib/jekyll-spaceship/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 379152712b0a1373687d9dd83d5e0ed002ba62c891d6746a5dd0968006794023
|
4
|
+
data.tar.gz: e98e3c2d3819d86132393a63030b1913083373f15fb9cca5ba664c465c078ea0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28199f722743b52508263c323c75eed9a014ec3abf567803bfbdf72aa7823fe4a28a4b8f486093e043b05e6e398f8badc988640e649c7d62eb930e9c161cab9e
|
7
|
+
data.tar.gz: b13bed955b451fa8c807f4cc85cb6293a89b01b199d6fcb4a195907caa649560b3cf7efe8838e44e904749386a23c32222a46ff3b154b00f183fa00e2429464b
|
data/README.md
CHANGED
@@ -9,6 +9,7 @@ A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, etc.
|
|
9
9
|
|
10
10
|
## Table of Contents
|
11
11
|
|
12
|
+
- [Requirements](#requirements)
|
12
13
|
- [Installation](#installation)
|
13
14
|
- [Usage](#usage)
|
14
15
|
- [1. Table Usage](#1-table-usage)
|
@@ -22,6 +23,8 @@ A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, etc.
|
|
22
23
|
- [Contributing](#contributing)
|
23
24
|
- [License](#license)
|
24
25
|
|
26
|
+
## Requirements
|
27
|
+
* Ruby >= 2.3.0
|
25
28
|
|
26
29
|
## Installation
|
27
30
|
|
@@ -9,7 +9,7 @@ module Jekyll::Spaceship
|
|
9
9
|
container = _register.first
|
10
10
|
events = _register.last.uniq
|
11
11
|
events = events.select do |event|
|
12
|
-
next true if event.match
|
12
|
+
next true if event.match(/^post/)
|
13
13
|
next !events.any?(event.to_s.gsub(/^pre/, 'post').to_sym)
|
14
14
|
end
|
15
15
|
events.each do |event|
|
@@ -18,7 +18,7 @@ module Jekyll::Spaceship
|
|
18
18
|
|
19
19
|
def self.use(name)
|
20
20
|
name = name.to_s.gsub(/-/, '').downcase
|
21
|
-
name += 'processor' unless name.match
|
21
|
+
name += 'processor' unless name.match(/processor$/)
|
22
22
|
|
23
23
|
self.walk(File.join(File.dirname(__FILE__), '/../processors')) do |path|
|
24
24
|
filename = File.basename(path, '.rb')
|
@@ -105,7 +105,7 @@ module Jekyll::Spaceship
|
|
105
105
|
# handle multi-rows
|
106
106
|
return if cell != cells.last
|
107
107
|
|
108
|
-
match = cell.content.match
|
108
|
+
match = cell.content.match(/\\$/)
|
109
109
|
if match
|
110
110
|
cell.content = cell.content.gsub(/\\$/, '')
|
111
111
|
if not scope_table.multi_row_start
|
@@ -142,7 +142,7 @@ module Jekyll::Spaceship
|
|
142
142
|
|
143
143
|
# handle rowspan
|
144
144
|
span_cell = scope_table.span_row_cells[scope_row.col_index]
|
145
|
-
if span_cell and cell.content.match
|
145
|
+
if span_cell and cell.content.match(/^\^{2}/)
|
146
146
|
cell.content = cell.content.gsub(/^\^{2}/, "")
|
147
147
|
span_cell.inner_html += "<br>#{cell.content}"
|
148
148
|
rowspan = span_cell.get_attribute("rowspan") || 1
|
@@ -161,11 +161,11 @@ module Jekyll::Spaceship
|
|
161
161
|
|
162
162
|
# pre-handle text align
|
163
163
|
align = 0
|
164
|
-
if cell.content.match
|
164
|
+
if cell.content.match(/^:(?!:)/)
|
165
165
|
cell.content = cell.content.gsub(/^:/, "")
|
166
166
|
align += 1
|
167
167
|
end
|
168
|
-
if cell.content.match
|
168
|
+
if cell.content.match(/(?<!\\):$/)
|
169
169
|
cell.content = cell.content.gsub(/:$/, "")
|
170
170
|
align += 2
|
171
171
|
end
|
@@ -186,7 +186,7 @@ module Jekyll::Spaceship
|
|
186
186
|
end
|
187
187
|
|
188
188
|
# handle existed inline-style
|
189
|
-
if style&.match
|
189
|
+
if style&.match(/text-align:.+/)
|
190
190
|
style = style.gsub(/text-align:.+/, align)
|
191
191
|
else
|
192
192
|
style = align
|
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.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeffreytse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|