ZMediumToMarkdown 2.0.7 → 2.0.10
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 +12 -4
- 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: 3b9c991933c802ea5089c22fe1de06dbcc4d7e121ccdd4f95c1c29368da4d309
|
4
|
+
data.tar.gz: ece588c2c5b60ad45b93c75c2362b717167782c491ee6b4a7c0ec5d2b3122119
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fdee119b831c25f6b8040a5338ad722808ed58f0009dd13deb9424d3b30aba4cbc45bf143dd3669c8cb76a2d3527a6a16d46442a3f6480fc56ea0d98461d862
|
7
|
+
data.tar.gz: b1d53026f922219e610a6a20e3e155bf38a1223396d97d5709c908869e718fa05bf03042fcf0bc996a1bbed906142afb7d16818198622f13193887392066e80d
|
@@ -171,11 +171,11 @@ class MarkupStyleRender
|
|
171
171
|
if markup.type == "EM"
|
172
172
|
tag = TagChar.new(2, markup.start, markup.end, "_", "_")
|
173
173
|
elsif markup.type == "CODE"
|
174
|
-
tag = TagChar.new(
|
174
|
+
tag = TagChar.new(0, markup.start, markup.end, "`", "`")
|
175
175
|
elsif markup.type == "STRONG"
|
176
176
|
tag = TagChar.new(2, markup.start, markup.end, "**", "**")
|
177
177
|
elsif markup.type == "ESCAPE"
|
178
|
-
escapeTagChar = TagChar.new(
|
178
|
+
escapeTagChar = TagChar.new(999,markup.start, markup.end,'','')
|
179
179
|
escapeTagChar.startChars = TextChar.new('\\'.chars,'Text')
|
180
180
|
escapeTagChar.endChars = TextChar.new([],'Text')
|
181
181
|
|
@@ -193,7 +193,7 @@ class MarkupStyleRender
|
|
193
193
|
if !lastPath.nil?
|
194
194
|
lastQuery = lastPath.split("-").last
|
195
195
|
end
|
196
|
-
|
196
|
+
|
197
197
|
if !usersPostURLs.nil? && !usersPostURLs.find { |usersPostURL| usersPostURL.split("/").last.split("-").last == lastQuery }.nil?
|
198
198
|
if isForJekyll
|
199
199
|
url = "(../#{lastQuery}/)"
|
@@ -250,9 +250,17 @@ class MarkupStyleRender
|
|
250
250
|
|
251
251
|
startTags = tags.select { |tag| tag.startIndex == index }.sort_by(&:sort)
|
252
252
|
if !startTags.nil?
|
253
|
+
hasCodeBlockTag = false
|
253
254
|
startTags.each do |tag|
|
254
|
-
|
255
|
+
if !hasCodeBlockTag
|
256
|
+
response.append(tag.startChars)
|
257
|
+
end
|
258
|
+
|
255
259
|
stack.append(tag)
|
260
|
+
|
261
|
+
if tag.startChars.chars.join() == "`"
|
262
|
+
hasCodeBlockTag = true
|
263
|
+
end
|
256
264
|
end
|
257
265
|
end
|
258
266
|
|