asciidoctor-html 0.1.10 → 0.1.11
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 +4 -4
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +4 -0
- data/lib/asciidoctor/html/ref_tree_processor.rb +10 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b31a232ef36bff4b9833aa68e7304c0616a1acd0ade2e82555bdb28da3c1f262
|
4
|
+
data.tar.gz: bcbb6f25581b2b1c87bbb0aa8fd97875d4eb7e04cbdd5eac9d729606b109a58f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c6d4903f2c15300c89e5aa485e7fde24cfd496c6243406e24e7273aa22896f092f77b5fd79151f62e8933e954f0e1fad38d4aaf8a43b5641462925ad6f7ccd5
|
7
|
+
data.tar.gz: 2aec7771279959980129181973f8a83d3803bcf9c585d65660859c60568fc3d0b2d4f00134451d8539bbcd799478dc564a4df10bc6ab5f0874ca44cc5552b420
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -113,7 +113,14 @@ module Asciidoctor
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def offset(list)
|
116
|
-
|
116
|
+
return (list.attr("start").to_i - 1) if list.attr?("start")
|
117
|
+
return 0 unless list.attr?("continue")
|
118
|
+
|
119
|
+
id = list.attr "continue"
|
120
|
+
node = list.document.catalog[:refs][id]
|
121
|
+
return node.attr("nflatitems") || node.items.size if node&.context == :olist
|
122
|
+
|
123
|
+
0
|
117
124
|
end
|
118
125
|
|
119
126
|
def shift(list)
|
@@ -227,7 +234,7 @@ module Asciidoctor
|
|
227
234
|
elsif olist? block
|
228
235
|
if listdepth.zero?
|
229
236
|
flat_style = (block.style == "pseudocode")
|
230
|
-
flat_idx = offset block
|
237
|
+
flat_idx = offset block
|
231
238
|
end
|
232
239
|
process_olist! block, listdepth, flat_style:
|
233
240
|
elsif olist_item?(block) && flat_style
|
@@ -245,6 +252,7 @@ module Asciidoctor
|
|
245
252
|
listdepth -= 1 if olist_item?(block) && move == :retreat
|
246
253
|
bulletdepth += 1 if ulist?(block) && move == :explore
|
247
254
|
bulletdepth -= 1 if ulist_item?(block) && move == :retreat
|
255
|
+
block.set_attr("nflatitems", flat_idx) if olist?(block) && flat_style && move == :retreat
|
248
256
|
end
|
249
257
|
end
|
250
258
|
end
|