coradoc-adoc 2.0.34 → 2.0.35
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66bedce9cc1cf693cd81c4115ea71c4e6e14c7884edd342eaaa41d4d148910dd
|
|
4
|
+
data.tar.gz: 4c9f6bce16946b3974be7e7f41cec00963ac8c86e92efe6735d44b532d6c17b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5eea4b4d5af74432117a5d53af089ca6c6ce2bd8d4f4ca4e57be0e09500d0a30b1b74b52332a0faafa7a18e5751732f89e6098c05cf13763e52e682f4e3fcbdb
|
|
7
|
+
data.tar.gz: 4c0d093e8dc45981b1c8872686597b88b04582e972a66661ad831659b59a06f32948d5a1f0277e53de6f6d4aefb9747428c4a187f8df1ba64b38df77f2118e03
|
|
@@ -19,7 +19,12 @@ module Coradoc
|
|
|
19
19
|
|
|
20
20
|
def document_attribute
|
|
21
21
|
str(':') >> attribute_name.as(:key) >> str(':') >>
|
|
22
|
-
|
|
22
|
+
# attribute_value itself already matches empty (its
|
|
23
|
+
# zero-width branch), so the former `| str('')` fallback was
|
|
24
|
+
# dead — ordered choice commits to attribute_value's empty
|
|
25
|
+
# match first — and the VM's shadowed-alternative lint
|
|
26
|
+
# (parsanol 1.3.55+) correctly rejects it.
|
|
27
|
+
space? >> attribute_value.as(:value) >> (line_ending | eof?)
|
|
23
28
|
end
|
|
24
29
|
end
|
|
25
30
|
end
|
|
@@ -138,7 +138,7 @@ module Coradoc
|
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
def link
|
|
141
|
-
((str('http')
|
|
141
|
+
((str('http') | str('https') | str('ftp')).present? >>
|
|
142
142
|
match('[A-Za-z0-9_.\\-:/&?=+,%#~;]+').repeat(1).as(:path) >>
|
|
143
143
|
(str('[') >> match('[^\\]]').repeat(1).as(:text) >> str(']')).maybe
|
|
144
144
|
).as(:link) |
|
|
@@ -201,19 +201,22 @@ module Coradoc
|
|
|
201
201
|
end
|
|
202
202
|
|
|
203
203
|
def inline_chars?
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
204
|
+
# Single lookahead over the whole dispatch alternation; the former
|
|
205
|
+
# per-branch .present? chain put zero-width branches in every
|
|
206
|
+
# non-last slot (shadowed-alternative lint, parsanol 1.3.55+).
|
|
207
|
+
(match('[\[*#_{<^~`]') |
|
|
208
|
+
typographic_quote |
|
|
209
|
+
str('http') |
|
|
210
|
+
str('https') |
|
|
211
|
+
str('link:') |
|
|
212
|
+
str('image:') |
|
|
213
|
+
str('+++') |
|
|
214
|
+
str('pass:') |
|
|
215
|
+
term_type |
|
|
216
|
+
str('footnote') |
|
|
217
|
+
stem_type |
|
|
218
|
+
str('\\<<') |
|
|
219
|
+
hard_line_break_marker?).present?
|
|
217
220
|
end
|
|
218
221
|
|
|
219
222
|
# AsciiDoc hard line break: a space followed by `+` at end of line,
|
|
@@ -221,8 +224,8 @@ module Coradoc
|
|
|
221
224
|
# the enclosing paragraph/verse. Recognised ahead of `text_unformatted`
|
|
222
225
|
# so the marker isn't swallowed as plain text.
|
|
223
226
|
def hard_line_break_marker?
|
|
224
|
-
(str(' +') >> str("\n"))
|
|
225
|
-
|
|
227
|
+
((str(' +') >> str("\n")) |
|
|
228
|
+
(str('\\') >> str("\n"))).present?
|
|
226
229
|
end
|
|
227
230
|
|
|
228
231
|
def hard_line_break
|
|
@@ -7,10 +7,10 @@ module Coradoc
|
|
|
7
7
|
module List
|
|
8
8
|
def list(nesting_level = 1)
|
|
9
9
|
(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
unordered_list(nesting_level) |
|
|
11
|
+
ordered_list(nesting_level) |
|
|
12
|
+
definition_list
|
|
13
|
+
).as(:list)
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def list_continuation
|
|
@@ -259,8 +259,8 @@ module Coradoc
|
|
|
259
259
|
end
|
|
260
260
|
|
|
261
261
|
def list_body_hard_break_marker?
|
|
262
|
-
(str(' +') >> str("\n"))
|
|
263
|
-
(str('\\') >> str("\n")).present?
|
|
262
|
+
((str(' +') >> str("\n")) |
|
|
263
|
+
(str('\\') >> str("\n"))).present?
|
|
264
264
|
end
|
|
265
265
|
|
|
266
266
|
# Recognizes line endings for a list body source line, including
|
|
@@ -49,7 +49,9 @@ module Coradoc
|
|
|
49
49
|
(paragraph_text_line(true).repeat(1, 1) >>
|
|
50
50
|
(newline.repeat(1).as(:line_break) | eof?)).repeat(0, 1))
|
|
51
51
|
).as(:lines) >>
|
|
52
|
-
|
|
52
|
+
# the former "| eof?" was dead: newline.repeat(0) already
|
|
53
|
+
# matches empty (shadowed-alternative lint, parsanol 1.3.55+)
|
|
54
|
+
newline.repeat(0)
|
|
53
55
|
).as(:paragraph)
|
|
54
56
|
end
|
|
55
57
|
|