markly 0.5.2 → 0.6.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 +6 -5
- data/lib/markly/version.rb +1 -1
- metadata +3 -4
- data/lib/markly/markly.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2985f6cac16bb57171c4b817c596683ec8d35afd6d0691f8aa0dd285e2eabb24
|
4
|
+
data.tar.gz: 98a0c5839f327c8204e66e714cf1801071541a20e68ace606d28b573af632b0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15789683e9e8f7d6ec5ce6ceed4f293a0e86b695b9453f80ed4f57149d4406f495dd8a232cdc311827f67e78c41337404db0a4a84d4a976b813da0c16431597f
|
7
|
+
data.tar.gz: 6aaa28e6a472e36b6af85774a2dd33292dfc3967ffa575fb9bfee3309712ffec58128866011aef42d7c64455b4cfac69195e9e454a25555733e8c5e05e7b7a9e
|
@@ -4,11 +4,12 @@ require 'cgi'
|
|
4
4
|
|
5
5
|
module Markly
|
6
6
|
class HTMLRenderer < Renderer
|
7
|
-
def initialize(ids: false, **options)
|
7
|
+
def initialize(ids: false, tight: false, **options)
|
8
8
|
super(**options)
|
9
9
|
|
10
10
|
@ids = ids
|
11
11
|
@section = nil
|
12
|
+
@tight = tight
|
12
13
|
end
|
13
14
|
|
14
15
|
def document(_)
|
@@ -40,7 +41,7 @@ module Markly
|
|
40
41
|
end
|
41
42
|
|
42
43
|
def paragraph(node)
|
43
|
-
if @
|
44
|
+
if @tight && node.parent.type != :blockquote
|
44
45
|
out(:children)
|
45
46
|
else
|
46
47
|
block do
|
@@ -56,8 +57,8 @@ module Markly
|
|
56
57
|
end
|
57
58
|
|
58
59
|
def list(node)
|
59
|
-
|
60
|
-
@
|
60
|
+
old_tight = @tight
|
61
|
+
@tight = node.list_tight
|
61
62
|
|
62
63
|
block do
|
63
64
|
if node.list_type == :bullet_list
|
@@ -76,7 +77,7 @@ module Markly
|
|
76
77
|
end
|
77
78
|
end
|
78
79
|
|
79
|
-
@
|
80
|
+
@tight = old_tight
|
80
81
|
end
|
81
82
|
|
82
83
|
def list_item(node)
|
data/lib/markly/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-07-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bake
|
@@ -150,7 +150,6 @@ files:
|
|
150
150
|
- ext/markly/xml.c
|
151
151
|
- lib/markly.rb
|
152
152
|
- lib/markly/flags.rb
|
153
|
-
- lib/markly/markly.so
|
154
153
|
- lib/markly/node.rb
|
155
154
|
- lib/markly/node/inspect.rb
|
156
155
|
- lib/markly/renderer.rb
|
@@ -176,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
175
|
- !ruby/object:Gem::Version
|
177
176
|
version: '0'
|
178
177
|
requirements: []
|
179
|
-
rubygems_version: 3.
|
178
|
+
rubygems_version: 3.2.22
|
180
179
|
signing_key:
|
181
180
|
specification_version: 4
|
182
181
|
summary: CommonMark parser and renderer. Written in C, wrapped in Ruby.
|
data/lib/markly/markly.so
DELETED
Binary file
|