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: e01614f789a5daeb57b910a08cca44b515cf6cb2e032799db68f1ec87c40bd52
4
- data.tar.gz: 484ef9ef4ce695aaa51caf7fe47c980b0fe6c4e0747d96c21eba5e4d26afe50c
3
+ metadata.gz: 0425e34011a043292dc14256c4649ec16f0bdade8f2a746e586c3011dc4ad1fc
4
+ data.tar.gz: c30c83e7c430f0b20889011ef5fd8b8fa5ff21419cd48dfef7f8be0302ca7832
5
5
  SHA512:
6
- metadata.gz: f2d55e4a8498e5489b1c4054393b47a7f95497c651e192d117e086470e65c967bbc16ebabdf263c946e1a17b19aa7ac8874c196bfe67cd713d2ff043694af501
7
- data.tar.gz: 78ecf304e7e675b0c0801f6cb9cb1d51b5915fc3a15e0bdfa24a0f916f1c219977504e1ebb1c0be5a2b919da487b655051857008c74b655e94ae3c5651495c93
6
+ metadata.gz: 8084b8fbe8836c2bcd30b8b9afc754879f53341d7b117234183be59dcdab6c6d87e5fef7f534b673f9f13283f6e4f398decd341c4c6cc185b138ee35134f118c
7
+ data.tar.gz: '0869b435d1224cab6ffe0637b87bedf6f9080e991b9382331d72e2238270eaa7b286997a071fc161f54249794e0afd9d8eb91b94d1f288cc654501934db1c159'
data/.rubocop.yml CHANGED
@@ -62,3 +62,10 @@ RSpec/FilePath :
62
62
 
63
63
  # RSpec/NestedGroups:
64
64
  # Max: 4
65
+
66
+ Layout/RedundantLineBreak:
67
+ Enabled: false
68
+
69
+ Style/DisableCopsWithinSourceCodeDirective:
70
+ Enabled: true
71
+ AllowedCops: ['Lint/InterpolationCheck']
@@ -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.11')
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.8', '< 2.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
- parsing_is_enabled = !parsing_is_enabled if line == '....'
77
+ shall_parse = @parsing_state.enabled?(line)
77
78
  filter = FILTERS.find { |onefilter| line.match(onefilter.regex) }
78
- if filter && parsing_is_enabled
79
+ if filter && shall_parse
79
80
  new_lines + __send__(filter.apply, line, Regexp.last_match)
80
81
  else
81
82
  new_lines + [line]
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Asciidoctor
5
5
  module DefMastership
6
- VERSION = '1.0.4'
6
+ VERSION = '1.0.5'
7
7
  public_constant :VERSION
8
8
  end
9
9
  end
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
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-03-12 00:00:00.000000000 Z
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.11'
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.11'
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.8
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.8
127
+ version: 1.0.13
128
128
  - - "<"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '2.0'