ZMediumToMarkdown 2.0.7 → 2.0.8

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: 411d9f653e728ad8708bfdd0738e181de68085865a3860e5d5272125236e856c
4
- data.tar.gz: 94c713a02a605b480bf63e1022a4ee53dcfca3fe4355daf401b2253354f6f194
3
+ metadata.gz: 15f4bb468ab40811678a1a7b38dc51aa6e442b28a8da0b3835dce158f6d90fd4
4
+ data.tar.gz: 67715feec8e9e7c9f798a61e61529e7846b2db42c86d0c8bd9dd43f3d2de971d
5
5
  SHA512:
6
- metadata.gz: 1b90384c75f6de2b1fcaaac3fcc1f3885ec6bf223698ce677c7cd621eec479eabead53794eb66d7ce2367867ef187468c733473e1e42a711eadf360a249a5803
7
- data.tar.gz: 89c9ec47b56b047042a060716f923ad1924722d17c842ccce954252976d8112cac0c3d610f7626caadd1a4eaada5031dea17ca26dea4349e2b8e9e2ca1431b1c
6
+ metadata.gz: 84f8eece59e468fb75768af6ed756dd96812ea81d8c6e6ecaeabf2c090db5f5bea10c39e8fc8693720322681f5ec902966371d4a95476f6f30ac8ada0782702e
7
+ data.tar.gz: 66c66d9b514fd8b0c81776e3dff2a466e91d291ebd9c466de8f6ca8ad19e7ba1d89aa154fa768e746194031805bf8722dbb8f0569b143e2700d04b550c0ce35f
@@ -76,7 +76,7 @@ end
76
76
  begin
77
77
  puts "#https://github.com/ZhgChgLi/ZMediumToMarkdown"
78
78
  puts "You have read and agree with the Disclaimer."
79
- Main.new()
79
+ #Main.new()
80
80
  puts "Execute Successfully!!!"
81
81
  puts "#https://github.com/ZhgChgLi/ZMediumToMarkdown"
82
82
  puts "#Thanks for using this tool."
@@ -86,4 +86,9 @@ rescue => e
86
86
  puts e.backtrace
87
87
  puts "#Please feel free to open an Issue or submit a fix/contribution via Pull Request on:\n"
88
88
  puts "#https://github.com/ZhgChgLi/ZMediumToMarkdown\n"
89
- end
89
+ end
90
+
91
+ obj = JSON.parse('{ "id": "e41429008434_63", "name": "35a0", "type": "ULI", "href": null, "layout": null, "metadata": null, "text": "[New] Customer reviews", "hasDropCap": null, "dropCapImage": null, "markups": [ { "type": "A", "start": 6, "end": 22, "href": "https://developer.apple.com/documentation/appstoreconnectapi/app_store/customer_reviews", "anchorType": "LINK", "userId": null, "linkMetadata": null, "__typename": "Markup" }, { "type": "STRONG", "start": 0, "end": 6, "href": null, "anchorType": null, "userId": null, "linkMetadata": null, "__typename": "Markup" } ], "__typename": "Paragraph", "iframe": null, "mixtapeMetadata": null }')
92
+ p = Paragraph.new(obj, "100")
93
+ r = MarkupParser.new(p, false)
94
+ puts r.parse()
@@ -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(3, markup.start, markup.end, "`", "`")
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(0,markup.start, markup.end,'','')
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}/)"
@@ -233,7 +233,7 @@ class ZMediumFetcher
233
233
  if lines.first.start_with?("---")
234
234
  dateLine = lines.select { |line| line.start_with?("last_modified_at:") }.first
235
235
  if !dateLine.nil?
236
- fileLatestPublishedAt = Time.parse(dateLine[/^(last_modified_at:)\s+(\S*)/, 2]).to_i
236
+ #fileLatestPublishedAt = Time.parse(dateLine[/^(last_modified_at:)\s+(\S*)/, 2]).to_i
237
237
  end
238
238
  end
239
239
  end
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.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZhgChgLi