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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4da10bf65ae4145aa5ebb31764dd2316d3046edfd4fd943768b0a10792a25c59
4
- data.tar.gz: db4ee042070865bbf43283fb51710728dd35df9bc503c72a9f31bad3de4bfe55
3
+ metadata.gz: 2985f6cac16bb57171c4b817c596683ec8d35afd6d0691f8aa0dd285e2eabb24
4
+ data.tar.gz: 98a0c5839f327c8204e66e714cf1801071541a20e68ace606d28b573af632b0b
5
5
  SHA512:
6
- metadata.gz: be0c0d657e2e6b4d26f89b9c03f042aa0661e88cb295b76f518888fd2e490e55f58ef3b7292090c5a25d23027d6b370b9a582acb68ff4b326f1c784a90b0d5bc
7
- data.tar.gz: 5cf044c518969df725a5822eb7974477d480926fa97d8b4bff71e2b628e70faa99107e60adadeef3377e157bac6d2ee200f9c6ede02da0beaff4c16a1929b5b3
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 @in_tight && node.parent.type != :blockquote
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
- old_in_tight = @in_tight
60
- @in_tight = node.list_tight
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
- @in_tight = old_in_tight
80
+ @tight = old_tight
80
81
  end
81
82
 
82
83
  def list_item(node)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Markly
4
- VERSION = '0.5.2'
4
+ VERSION = '0.6.0'
5
5
  end
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.5.2
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: 2020-08-02 00:00:00.000000000 Z
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.1.2
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