mato 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -1
- data/CHANGELOG.md +6 -0
- data/lib/mato/anchor_builder.rb +7 -1
- data/lib/mato/config.rb +3 -0
- data/lib/mato/converter.rb +1 -1
- data/lib/mato/document.rb +0 -1
- data/lib/mato/html_filters/bare_inline_element.rb +1 -0
- data/lib/mato/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae49205cffd8bb04eda2cb06753f69b22fa00fe306e5bfb1b6272aa6798548df
|
4
|
+
data.tar.gz: 4c81ac4ccd5452847ac8bee9f5da87923c91f0aa11b4808497ce278a82f4308c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d9d711ec47f52a5b5835172c3884b2ccc1b3b23ca0bc7374b7693d72c562ce0546f8e427a957b20c4527e1d434efef1fb20409199516fba9ed057b7a4725be5
|
7
|
+
data.tar.gz: fcbab2b0c37a2d7272361c41e972a6ae7531ee2c10e349342fb526556b5a78ea7d1ba9729596a173d814e9673cc7403535da0517c6076b4c0969f7374055cfab
|
data/.rubocop.yml
CHANGED
@@ -90,7 +90,10 @@ Style/SignalException:
|
|
90
90
|
Style/StringLiterals:
|
91
91
|
Enabled: false
|
92
92
|
|
93
|
-
Style/
|
93
|
+
Style/TrailingCommaInArrayLiteral:
|
94
|
+
EnforcedStyleForMultiline: comma
|
95
|
+
|
96
|
+
Style/TrailingCommaInHashLiteral:
|
94
97
|
EnforcedStyleForMultiline: comma
|
95
98
|
|
96
99
|
Style/TrailingCommaInArguments:
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# The revision history of Mato
|
2
2
|
|
3
|
+
## v2.1.3 - 2019/1/15
|
4
|
+
|
5
|
+
https://github.com/bitjourney/mato/compare/v2.1.2...v2.1.3
|
6
|
+
|
7
|
+
* Fix anchor in case of heading which is only special characters
|
8
|
+
|
3
9
|
## v2.1.2 - 2018/10/23
|
4
10
|
|
5
11
|
https://github.com/bitjourney/mato/compare/v2.1.1...v2.1.2
|
data/lib/mato/anchor_builder.rb
CHANGED
@@ -44,7 +44,13 @@ module Mato
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def make_anchor_id_prefix(text)
|
47
|
-
ERB::Util.url_encode(text.downcase.gsub(/[^\p{Word}\- ]/u, "").tr(" ", "-"))
|
47
|
+
prefix = ERB::Util.url_encode(text.downcase.gsub(/[^\p{Word}\- ]/u, "").tr(" ", "-"))
|
48
|
+
|
49
|
+
if prefix.empty?
|
50
|
+
"user-content" # GitHub compatible
|
51
|
+
else
|
52
|
+
prefix
|
53
|
+
end
|
48
54
|
end
|
49
55
|
end
|
50
56
|
end
|
data/lib/mato/config.rb
CHANGED
@@ -80,16 +80,19 @@ module Mato
|
|
80
80
|
|
81
81
|
def append_text_filter(text_filter, timeout: nil, on_timeout: nil, on_error: nil)
|
82
82
|
raise "text_filter must respond to call()" unless text_filter.respond_to?(:call)
|
83
|
+
|
83
84
|
text_filters.push(wrap(text_filter, timeout: timeout, on_timeout: on_timeout, on_error: on_error))
|
84
85
|
end
|
85
86
|
|
86
87
|
def append_markdown_filter(markdown_filter, timeout: nil, on_timeout: nil, on_error: nil)
|
87
88
|
raise "markdown_filter must respond to call()" unless markdown_filter.respond_to?(:call)
|
89
|
+
|
88
90
|
markdown_filters.push(wrap(markdown_filter, timeout: timeout, on_timeout: on_timeout, on_error: on_error))
|
89
91
|
end
|
90
92
|
|
91
93
|
def append_html_filter(html_filter, timeout: nil, on_timeout: nil, on_error: nil)
|
92
94
|
raise "html_filter must respond to call()" unless html_filter.respond_to?(:call)
|
95
|
+
|
93
96
|
html_filters.push(wrap(html_filter, timeout: timeout, on_timeout: on_timeout, on_error: on_error))
|
94
97
|
end
|
95
98
|
|
data/lib/mato/converter.rb
CHANGED
@@ -48,7 +48,7 @@ module Mato
|
|
48
48
|
node.sourcepos[:start_column] == 1 &&
|
49
49
|
node.parent.type == :paragraph &&
|
50
50
|
node.parent.parent.type == :document
|
51
|
-
end.
|
51
|
+
end.reverse_each do |node|
|
52
52
|
replacement = node.string_content.gsub(/\A(#+)(?=\S)/, '\1 ')
|
53
53
|
|
54
54
|
if node.string_content != replacement
|
data/lib/mato/document.rb
CHANGED
data/lib/mato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FUJI Goro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commonmarker
|
@@ -108,8 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
|
112
|
-
rubygems_version: 2.7.6
|
111
|
+
rubygems_version: 3.0.1
|
113
112
|
signing_key:
|
114
113
|
specification_version: 4
|
115
114
|
summary: MArkdown TOolkit
|