mato 2.1.2 → 2.1.3

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: 96f1b60efb3bcd7510d87d0d87a0d545f7d9f5f65b8abb0543b7150fc62ab3f1
4
- data.tar.gz: 3761d309afd64f7642e8ad6cb75d01f9935e6cafe48278b81512726b2d49e453
3
+ metadata.gz: ae49205cffd8bb04eda2cb06753f69b22fa00fe306e5bfb1b6272aa6798548df
4
+ data.tar.gz: 4c81ac4ccd5452847ac8bee9f5da87923c91f0aa11b4808497ce278a82f4308c
5
5
  SHA512:
6
- metadata.gz: '00090b55259a7d93d0ff4f83541c4aa9fd4ac314447161b179c53c0c8eb6142a494371c8ab48bc8063d68bacab19be5fcae343be504a1c3ddf9a586c5e603784'
7
- data.tar.gz: eb898f49f4dc12f399d5090793721a83f4aeb19a97d06e0db7815198d65dc18998e6c43a8b86c592332b97d34cd39445330664f9ce2b1e78b813661c0137ea69
6
+ metadata.gz: 9d9d711ec47f52a5b5835172c3884b2ccc1b3b23ca0bc7374b7693d72c562ce0546f8e427a957b20c4527e1d434efef1fb20409199516fba9ed057b7a4725be5
7
+ data.tar.gz: fcbab2b0c37a2d7272361c41e972a6ae7531ee2c10e349342fb526556b5a78ea7d1ba9729596a173d814e9673cc7403535da0517c6076b4c0969f7374055cfab
@@ -90,7 +90,10 @@ Style/SignalException:
90
90
  Style/StringLiterals:
91
91
  Enabled: false
92
92
 
93
- Style/TrailingCommaInLiteral:
93
+ Style/TrailingCommaInArrayLiteral:
94
+ EnforcedStyleForMultiline: comma
95
+
96
+ Style/TrailingCommaInHashLiteral:
94
97
  EnforcedStyleForMultiline: comma
95
98
 
96
99
  Style/TrailingCommaInArguments:
@@ -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
@@ -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
@@ -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
 
@@ -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.reverse.each do |node|
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
@@ -1,4 +1,3 @@
1
-
2
1
  # frozen_string_literal: true
3
2
 
4
3
  require_relative './renderers/html_renderer'
@@ -17,6 +17,7 @@ module Mato
17
17
  def call(doc)
18
18
  doc.children.each do |node|
19
19
  next unless STANDALONE_INLINE_ELEMENTS.include?(node.name)
20
+
20
21
  parent = Nokogiri::HTML.fragment('<p/>')
21
22
  parent.child.add_child(node.dup)
22
23
  node.replace(parent)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mato
4
- VERSION = "2.1.2"
4
+ VERSION = "2.1.3"
5
5
  end
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.2
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: 2018-10-24 00:00:00.000000000 Z
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
- rubyforge_project:
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