ZMediumToMarkdown 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e19605bba5d079fa1086c14dfb33c7d33f36da86b46c6c6c97affc960521d26
4
- data.tar.gz: 96e13a36f2573d2dae057ee7a318ad66d9d09dc69990deff5bf5033a72032f8c
3
+ metadata.gz: 673668e3ca1352038648b06d6609487245b2982fb578dd46343e3ff30c131ae2
4
+ data.tar.gz: a1a1b47c9636355159c596727623da2671599205bd09f1f13f1ed845aac00011
5
5
  SHA512:
6
- metadata.gz: 81e76d2686c7f06976ea9fdcb09243b75e5f628669e3c405b27a636705d6a54862f264c569bc4e33bcf571d3ba6696ed578b20a45350ea81fb993b605d76e860
7
- data.tar.gz: 34d756095ba13548c551da107d9e4903b51d094087ce8ac71ed140f52adf0e3a852afbe35bae15b27c09ed08cafb4df91fc121bdf7e262b123e989b3053af8bb
6
+ metadata.gz: 62479c101f23b764d47284caa539e2d595b9eebac74740d41640ae77243ca29bb4be0bb5afa62fcc8f8c5626ad15213d505d939a00c5252cecdc90da26248b35
7
+ data.tar.gz: 88e098a067736f654719fa11c86ee133c8c2403606e18ea01d22f9c39c86861b68708a64a0d7c7bed0dd949b7a90510903c8eb6f8975d0fd6c4a1fe9da24e564
@@ -57,7 +57,19 @@ class MarkupStyleRender
57
57
 
58
58
  def parse
59
59
  if paragraph.markups.nil? || paragraph.markups.empty?
60
- response = chars.values
60
+ # No markup tags ⇒ walkCharsWithTags is skipped. For Jekyll
61
+ # output we still need to HTML-escape `<` / `>` so kramdown
62
+ # doesn't treat raw chars in the source text as bare HTML tags.
63
+ # Non-Jekyll output keeps the chars as-is.
64
+ response = if isForJekyll
65
+ chars.values.map do |c|
66
+ next c if c.chars.empty?
67
+ escaped = Helper.escapeHTML(c.chars.join, true)
68
+ TextChar.new(escaped.chars, "Text")
69
+ end
70
+ else
71
+ chars.values
72
+ end
61
73
  else
62
74
  tags = buildTags(paragraph.markups).sort_by(&:startIndex)
63
75
  response = walkCharsWithTags(tags)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ZMediumToMarkdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZhgChgLi