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 +4 -4
- data/lib/Parsers/MarkupStyleRender.rb +13 -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: 673668e3ca1352038648b06d6609487245b2982fb578dd46343e3ff30c131ae2
|
|
4
|
+
data.tar.gz: a1a1b47c9636355159c596727623da2671599205bd09f1f13f1ed845aac00011
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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)
|