asciidoctor-defmastership 1.0.4 → 1.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0425e34011a043292dc14256c4649ec16f0bdade8f2a746e586c3011dc4ad1fc
|
4
|
+
data.tar.gz: c30c83e7c430f0b20889011ef5fd8b8fa5ff21419cd48dfef7f8be0302ca7832
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8084b8fbe8836c2bcd30b8b9afc754879f53341d7b117234183be59dcdab6c6d87e5fef7f534b673f9f13283f6e4f398decd341c4c6cc185b138ee35134f118c
|
7
|
+
data.tar.gz: '0869b435d1224cab6ffe0637b87bedf6f9080e991b9382331d72e2238270eaa7b286997a071fc161f54249794e0afd9d8eb91b94d1f288cc654501934db1c159'
|
data/.rubocop.yml
CHANGED
@@ -36,10 +36,10 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency('aruba')
|
37
37
|
spec.add_development_dependency('rake')
|
38
38
|
spec.add_development_dependency('rspec')
|
39
|
-
spec.add_development_dependency('rubocop', '1.
|
39
|
+
spec.add_development_dependency('rubocop', '1.13')
|
40
40
|
spec.add_development_dependency('rubocop-rake', '~> 0.5')
|
41
41
|
spec.add_development_dependency('rubocop-rspec', '~> 2.0')
|
42
42
|
|
43
43
|
spec.add_dependency('asciidoctor', '~> 2.0')
|
44
|
-
spec.add_dependency('defmastership', '>= 1.0.
|
44
|
+
spec.add_dependency('defmastership', '>= 1.0.13', '< 2.0')
|
45
45
|
end
|
@@ -21,6 +21,7 @@ require('asciidoctor/extensions') unless RUBY_ENGINE == 'opal'
|
|
21
21
|
# This shall be nice.
|
22
22
|
#
|
23
23
|
require('defmastership/constants')
|
24
|
+
require('defmastership/parsing_state')
|
24
25
|
|
25
26
|
module Asciidoctor
|
26
27
|
module DefMastership
|
@@ -58,6 +59,7 @@ module Asciidoctor
|
|
58
59
|
# This is a preprocessor: we need to parse tag attributes
|
59
60
|
@parsing_is_enabled = true
|
60
61
|
@has_url = {}
|
62
|
+
@parsing_state = ::DefMastership::ParsingState.new
|
61
63
|
end
|
62
64
|
|
63
65
|
# process the document
|
@@ -71,11 +73,10 @@ module Asciidoctor
|
|
71
73
|
private
|
72
74
|
|
73
75
|
def parse_and_replace(lines)
|
74
|
-
parsing_is_enabled = true
|
75
76
|
lines.reduce([]) do |new_lines, line|
|
76
|
-
|
77
|
+
shall_parse = @parsing_state.enabled?(line)
|
77
78
|
filter = FILTERS.find { |onefilter| line.match(onefilter.regex) }
|
78
|
-
if filter &&
|
79
|
+
if filter && shall_parse
|
79
80
|
new_lines + __send__(filter.apply, line, Regexp.last_match)
|
80
81
|
else
|
81
82
|
new_lines + [line]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-defmastership
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jérôme Arbez-Gindre
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aruba
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.13'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.13'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubocop-rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.0.
|
117
|
+
version: 1.0.13
|
118
118
|
- - "<"
|
119
119
|
- !ruby/object:Gem::Version
|
120
120
|
version: '2.0'
|
@@ -124,7 +124,7 @@ dependencies:
|
|
124
124
|
requirements:
|
125
125
|
- - ">="
|
126
126
|
- !ruby/object:Gem::Version
|
127
|
-
version: 1.0.
|
127
|
+
version: 1.0.13
|
128
128
|
- - "<"
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '2.0'
|