ZMediumToMarkdown 2.1.8 → 2.1.9

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: e8f852c73a60ac2d43c28c9fed9b7c217df4b1afc34e77e14f73b9b949ba7530
4
- data.tar.gz: cd7aae4e3b23d662fed1f89d7c078b141e947a06c816f6e53e954f2752b726e4
3
+ metadata.gz: bf482465d9d4d2912bb952af23b59113e217895719840a9e20c3075758b16223
4
+ data.tar.gz: 9c5f8ccda1dc1d0c730a4f11559e68018da149885b243e8865e2206f1a54c017
5
5
  SHA512:
6
- metadata.gz: 25b1b6aa357c4cca7cb588da0668d181ade6ab89cee7556ad8dd1190c4c98a9e08d3ed88ff9354fe885da65a582bb97d1df0f1a753bf68f33ecbc64c6a0f10dc
7
- data.tar.gz: 80dc1d96a5af95aa3940d77f7e166fe1d113ff5b729c428658101629518827f46312dbdc216a1343e1eada0d5162931f66ef563e81b5c8a42ec7a67a218fcaa7
6
+ metadata.gz: 6d4d7449712d21825be0cb839dd2ebbcfed33cac094bd3176c84ddf11921cb0c3968ca8d05cf279cc4fa0877778e10e54a2fad97613e7eadc802e948b5e61fc5
7
+ data.tar.gz: ec4f667d44c167fb0d3d5380c7f21eebcf55efc5d3c038b57e5949ae703960e769bfde70c682bfc4517527dc90482b051b796b31d4562b89b0a1a96a9f6f9a4f
data/lib/Helper.rb CHANGED
@@ -24,13 +24,9 @@ class Helper
24
24
  end
25
25
 
26
26
  def self.escapeHTML(text)
27
- if text == "<"
28
- "&lt;"
29
- elsif text == ">"
30
- "&gt;"
31
- else
32
- text
33
- end
27
+ text = text.gsub(/(<)/, '&lt;')
28
+ text = text.gsub(/(>)/, '&gt;')
29
+ text
34
30
  end
35
31
 
36
32
  def self.createDirIfNotExist(dirPath)
@@ -26,6 +26,10 @@ class MarkupParser
26
26
  Helper.makeWarningText("Error occurred during render markup text, please help to open an issue on github.")
27
27
  end
28
28
  end
29
+
30
+ if isForJekyll
31
+ result = Helper.escapeHTML(result)
32
+ end
29
33
 
30
34
  result
31
35
  end
@@ -272,10 +272,6 @@ class MarkupStyleRender
272
272
  response.append(char)
273
273
  else
274
274
  resultChar = Helper.escapeMarkdown(char.chars.join())
275
- if isForJekyll
276
- resultChar = Helper.escapeHTML(resultChar)
277
- end
278
-
279
275
  response.append(TextChar.new(resultChar.chars, "Text"))
280
276
  end
281
277
  end
@@ -315,10 +311,6 @@ class MarkupStyleRender
315
311
  response = []
316
312
  chars.each do |index, char|
317
313
  resultChar = char
318
- if isForJekyll
319
- resultChar = escapeHTML(char)
320
- end
321
-
322
314
  response.append(resultChar)
323
315
  end
324
316
 
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: 2.1.8
4
+ version: 2.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZhgChgLi