markly 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/markly/renderer/html_renderer.rb +7 -1
- data/lib/markly/version.rb +1 -1
- 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: 382ef4ee5a2e69398268595c59f914fc694c1fa0e450b7ba2f74a6ef06d17ede
|
4
|
+
data.tar.gz: 5d7119359d1f485980ac4ba9736384f0c67ac0002133021fccf3aa81896ef46e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b941bb485e19ed83aa4268e5586f39fdc4919e9dc6362dd729980b698a5f35e26299a742382e6055ee644d297393c0c1e95ef8cac5003765beb9ff47f1dc384
|
7
|
+
data.tar.gz: 356b61f0db0b4c0fa57d2cca31943264daaad9c31ed2bc5a04d7cdebf0fa27d863215c1ae1a48372d5ccc1b9a52a287ad8fee3657a778667d76cb3bf37592dff
|
@@ -8,11 +8,14 @@ module Markly
|
|
8
8
|
super(**options)
|
9
9
|
|
10
10
|
@ids = ids
|
11
|
+
@section = nil
|
11
12
|
end
|
12
13
|
|
13
14
|
def document(_)
|
15
|
+
@section = false
|
14
16
|
super
|
15
17
|
out("</ol>\n</section>\n") if @written_footnote_ix
|
18
|
+
out("</section>") if @section
|
16
19
|
end
|
17
20
|
|
18
21
|
def id_for(node)
|
@@ -25,7 +28,10 @@ module Markly
|
|
25
28
|
|
26
29
|
def header(node)
|
27
30
|
block do
|
28
|
-
out('
|
31
|
+
out('</section>') if @section
|
32
|
+
@section = true
|
33
|
+
out("<section #{id_for(node)}>")
|
34
|
+
out('<h', node.header_level, "#{source_position(node)}>", :children,
|
29
35
|
'</h', node.header_level, '>')
|
30
36
|
end
|
31
37
|
end
|
data/lib/markly/version.rb
CHANGED