asciidoctor-html5s 0.1.0.beta.8 → 0.1.0.beta.9
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: 9949bf88aa17ad0064e393ab78e67057841e1b1da5a5fa1cdd3d916e0c203c94
|
4
|
+
data.tar.gz: fa1298c9b61194d9e2e21883580654008e5e5c576b77b71ac04ee4340c92f626
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd4f1dc8b891c1af710b7a71f0460d696d3b1b4407339324f9968f7eed7b42699e77caf240bdb409cd7d550a21ef9ec39047139b1536f50496c04321f13c5fc4
|
7
|
+
data.tar.gz: e8f0a3088f2da2e244194592f932497b9dc55a6390ab6825e7261daa6e676ae8a8c0d8c71f3d45fa1d63a5e6379ede5b397e36ee6bf84a4afb81e34ded930d8b
|
File without changes
|
@@ -9,20 +9,18 @@ module Asciidoctor::Html5s
|
|
9
9
|
class AttachedColistTreeprocessor < ::Asciidoctor::Extensions::Treeprocessor
|
10
10
|
|
11
11
|
def process(document)
|
12
|
-
|
13
|
-
# the #find_by iteration is done to make it work under Opal.
|
14
|
-
# See <https://github.com/jirutka/asciidoctor-html5s/issues/7>.
|
15
|
-
document.find_by(context: :colist).reduce([]) { |memo, colist|
|
12
|
+
document.find_by(context: :colist) do |colist|
|
16
13
|
blocks = colist.parent.blocks
|
17
14
|
colist_idx = blocks.find_index(colist)
|
18
15
|
prev_block = blocks[colist_idx - 1] if colist_idx
|
19
16
|
|
20
17
|
if prev_block && prev_block.node_name == 'listing'
|
21
18
|
prev_block.instance_variable_set(:@html5s_colist, colist)
|
22
|
-
|
19
|
+
# XXX: This mutates node's blocks list!
|
20
|
+
# :empty is our special block type that just outputs nothing.
|
21
|
+
blocks[colist_idx] = create_block(colist.parent, :empty, '', {})
|
23
22
|
end
|
24
|
-
|
25
|
-
}.each(&:call)
|
23
|
+
end
|
26
24
|
end
|
27
25
|
end
|
28
26
|
end
|
@@ -929,6 +929,14 @@ class Asciidoctor::Html5s::Converter < ::Asciidoctor::Converter::Base
|
|
929
929
|
end
|
930
930
|
end
|
931
931
|
|
932
|
+
def empty(node, opts = {})
|
933
|
+
node.extend(Helpers)
|
934
|
+
node.instance_eval do
|
935
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
936
|
+
_buf = []; ; _buf = _buf.join("")
|
937
|
+
end
|
938
|
+
end
|
939
|
+
|
932
940
|
def example(node, opts = {})
|
933
941
|
node.extend(Helpers)
|
934
942
|
node.instance_eval do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-html5s
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.beta.
|
4
|
+
version: 0.1.0.beta.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakub Jirutka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- data/templates/dlist.html.slim
|
163
163
|
- data/templates/document.html.slim
|
164
164
|
- data/templates/embedded.html.slim
|
165
|
+
- data/templates/empty.html.slim
|
165
166
|
- data/templates/example.html.slim
|
166
167
|
- data/templates/floating_title.html.slim
|
167
168
|
- data/templates/helpers.rb
|