darkmouun 2.0.2 → 2.1.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: 8ee7a1c55cc3dbae755416b1fc4dc3e8cc6718fbf133197755d164768a81ca32
4
- data.tar.gz: 4fb1e37d283016f36be823dcd0b3bbc45123d8978f6ea3cb8658aeb5bd3fed6c
3
+ metadata.gz: a0e5ba37ba1ee837c723ff67a384a4104f24aa592c1b33d4fa328faaf089a539
4
+ data.tar.gz: 72e1fbe968e1a41b657918349ea2692516ece783fabfaf762e1ab7cab10b7264
5
5
  SHA512:
6
- metadata.gz: 0bf23967422b37d38af009ae0bd6add04b1d884da54d5f93bb2be99aecb3fd90eed0fdc67a9ac3b8fad9a013b2549c40474f985073bcfa9560f1718afb86b28d
7
- data.tar.gz: ffca9b7b0298cfdce242c746f73a0279bd3e814ec55cf77c9ab6d792aca49d94713784d3ffb0f375f74fc48d491fb230cd1da76968e0215e5d1fac64f2ca7aab
6
+ metadata.gz: e208d87f52f188804fd3b25e28313f5d257e703984dc3f8d4091b09c7010e14721d9d64eae1ec799c37fe97ea990d260b8ad686f33f5f2bd19a3c2a54f5ce861
7
+ data.tar.gz: 0f58155fc090699282ca2020b48eb1a39d78c2bb6b31b619248d98b141bc2c7f8588b6d74540c9bb899e41a2c0bdf9f07f4244121ba0a6da8a8b0c71107fe17c
@@ -16,7 +16,7 @@ module Kramdown
16
16
  # no nested links allowed
17
17
  if link_type == :a && (@tree.type == :img || @tree.type == :a ||
18
18
  @stack.any? {|t, _| t && (t.type == :img || t.type == :a) })
19
- add_text(result)
19
+ parse_span
20
20
  return
21
21
  end
22
22
  el = Element.new(link_type, nil, nil, location: start_line_number)
@@ -36,18 +36,14 @@ module Kramdown
36
36
 
37
37
  # reference style link or no link url
38
38
  if @src.scan(LINK_INLINE_ID_RE) || !@src.check(/\(/)
39
- emit_warning = !@src[1]
40
39
  link_id = normalize_link_id(@src[1] || alt_text)
41
40
  if @link_defs.key?(link_id)
42
41
  link_def = @link_defs[link_id]
43
42
  add_link(el, link_def[0], link_def[1], alt_text,
44
43
  link_def[2] && link_def[2].options[:ial])
45
44
  else
46
- if emit_warning
47
- warning("No link definition for link ID '#{link_id}' found on line #{start_line_number}")
48
- end
49
45
  @src.revert_pos(saved_pos)
50
- add_text(result)
46
+ parse_span
51
47
  end
52
48
  return
53
49
  end
@@ -6,14 +6,13 @@ module Kramdown
6
6
  module Parser
7
7
  class Kramdown
8
8
 
9
- SPAN_START = /(?:\[\s*?)/
10
-
11
9
  # Parse the span at the current location.
12
10
  def parse_span
13
11
  start_line_number = @src.current_line_number
14
12
  saved_pos = @src.save_pos
15
13
 
16
- result = @src.scan(SPAN_START)
14
+ span_start = /(?:\[\s*?)/
15
+ result = @src.scan(span_start)
17
16
  stop_re = /(?:\s*?\])/
18
17
 
19
18
  el = Element.new(:span, nil, nil, :location => start_line_number)
@@ -23,11 +22,6 @@ module Kramdown
23
22
 
24
23
  if found
25
24
  @src.scan(stop_re)
26
- if @src.check(/\(/)
27
- @src.revert_pos(saved_pos)
28
- parse_link
29
- return
30
- end
31
25
  @tree.children << el
32
26
  else
33
27
  @src.revert_pos(saved_pos)
@@ -35,7 +29,6 @@ module Kramdown
35
29
  add_text(result)
36
30
  end
37
31
  end
38
- define_parser(:span, SPAN_START, '\[')
39
32
 
40
33
  end
41
34
  end
@@ -9,15 +9,5 @@ module Kramdown
9
9
  class Element
10
10
  CATEGORY[:span] = :span
11
11
  end
12
-
13
- module Parser
14
- class Kramdown
15
- alias_method :super_initialize, :initialize
16
- def initialize(source, options)
17
- super_initialize(source, options)
18
- @span_parsers[5] = :span
19
- end
20
- end
21
- end
22
12
  end
23
13
 
@@ -1,3 +1,3 @@
1
1
  module Darkmouun
2
- VERSION = "2.0.2"
2
+ VERSION = "2.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darkmouun
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori Ichigo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-05 00:00:00.000000000 Z
11
+ date: 2021-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler