pot_markdown 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/.rubocop_todo.yml +2 -2
- data/.travis.yml +2 -3
- data/lib/kramdown/parser/pot_markdown.rb +0 -1
- data/lib/kramdown/parser/pot_markdown/code_block.rb +2 -1
- data/lib/pot_markdown/filters/sanitize_html_filter.rb +2 -3
- data/lib/pot_markdown/processor.rb +1 -0
- data/lib/pot_markdown/version.rb +1 -1
- data/pot_markdown.gemspec +4 -4
- metadata +14 -15
- data/lib/kramdown/parser/pot_markdown/atx_header.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd3834f83a518959ab498ab9c13c8f9079f8d498
|
4
|
+
data.tar.gz: 2010579f45e3fa35719c58ce8732c062f1f0f5f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51d8be497313a33d634d09a73ec0f5775b4753f2f3c68213284ea26699aec816d6210554f437ba32fb23ea53dcf226604bf494943527538d50cf7b0dab4abb0c
|
7
|
+
data.tar.gz: 9e0932318a3f8ce966e0d539f4319d8daa33a49a91a7899028f76c10f5e11bd4dcc3c5f96aa161c48999b9f35181022c1388a0cfc7302a2f3f5f5d17a5f71180
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2016-
|
3
|
+
# on 2016-10-16 15:15:49 +0900 using RuboCop version 0.44.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 4
|
10
10
|
Metrics/AbcSize:
|
11
11
|
Max: 33
|
data/.travis.yml
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
module Kramdown
|
2
2
|
module Parser
|
3
3
|
class PotMarkdown
|
4
|
-
|
4
|
+
FENCED_CODEBLOCK_START = /^[ ]{0,3}[~`]{3,}/
|
5
|
+
FENCED_CODEBLOCK_MATCH = /^[ ]{0,3}(([~`]){3,})\s*?((\S+?)(?:\?\S*)?)?\s*?\n(.*?)^[ ]{0,3}\1\2*\s*?\n/m
|
5
6
|
|
6
7
|
def parse_codeblock_fenced
|
7
8
|
if @src.check(self.class::FENCED_CODEBLOCK_MATCH)
|
@@ -148,10 +148,9 @@ module PotMarkdown
|
|
148
148
|
private
|
149
149
|
|
150
150
|
def rule
|
151
|
-
|
152
|
-
when context[:sanitize_rule]
|
151
|
+
if context[:sanitize_rule]
|
153
152
|
context[:sanitize_rule]
|
154
|
-
|
153
|
+
elsif context[:sanitize_use_external]
|
155
154
|
RULE_EXT
|
156
155
|
else
|
157
156
|
RULE
|
data/lib/pot_markdown/version.rb
CHANGED
data/pot_markdown.gemspec
CHANGED
@@ -17,9 +17,9 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_dependency 'html-pipeline', '~> 2.
|
21
|
-
spec.add_dependency 'kramdown', '~> 1.
|
22
|
-
spec.add_dependency 'rouge'
|
20
|
+
spec.add_dependency 'html-pipeline', '~> 2.4'
|
21
|
+
spec.add_dependency 'kramdown', '~> 1.12'
|
22
|
+
spec.add_dependency 'rouge', '~> 1.8'
|
23
23
|
spec.add_dependency 'gemoji'
|
24
24
|
spec.add_dependency 'rinku'
|
25
25
|
spec.add_dependency 'sanitize'
|
@@ -30,6 +30,6 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'benchmark-ips'
|
31
31
|
spec.add_development_dependency 'test-unit'
|
32
32
|
spec.add_development_dependency 'diffy'
|
33
|
-
spec.add_development_dependency 'rubocop'
|
33
|
+
spec.add_development_dependency 'rubocop', '0.44.1'
|
34
34
|
spec.add_development_dependency 'activesupport'
|
35
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pot_markdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ru_shalm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html-pipeline
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: kramdown
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.12'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.12'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rouge
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.8'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: gemoji
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,16 +182,16 @@ dependencies:
|
|
182
182
|
name: rubocop
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- -
|
185
|
+
- - '='
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: 0.44.1
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- -
|
192
|
+
- - '='
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 0.44.1
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: activesupport
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,7 +223,6 @@ files:
|
|
223
223
|
- bin/console
|
224
224
|
- bin/setup
|
225
225
|
- lib/kramdown/parser/pot_markdown.rb
|
226
|
-
- lib/kramdown/parser/pot_markdown/atx_header.rb
|
227
226
|
- lib/kramdown/parser/pot_markdown/code_block.rb
|
228
227
|
- lib/kramdown/parser/pot_markdown/table.rb
|
229
228
|
- lib/pot_markdown.rb
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Kramdown
|
2
|
-
module Parser
|
3
|
-
class PotMarkdown
|
4
|
-
def parse_atx_header
|
5
|
-
# ↓ removed in pot_markdown
|
6
|
-
# return false if !after_block_boundary?
|
7
|
-
|
8
|
-
start_line_number = @src.current_line_number
|
9
|
-
@src.check(ATX_HEADER_MATCH)
|
10
|
-
level = @src[1]
|
11
|
-
text = @src[2].to_s.strip
|
12
|
-
id = @src[3]
|
13
|
-
return false if text.empty?
|
14
|
-
|
15
|
-
@src.pos += @src.matched_size
|
16
|
-
el = new_block_el(:header, nil, nil, level: level.length, raw_text: text, location: start_line_number)
|
17
|
-
add_text(text, el)
|
18
|
-
el.attr['id'] = id if id
|
19
|
-
@tree.children << el
|
20
|
-
true
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|