ZMediumToMarkdown 2.4.1 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Parsers/IframeParser.rb +19 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b853d78f150d3134ac412b310a53a864fa4808a7c6dd476c28f534ecc607de18
|
4
|
+
data.tar.gz: 886dcd5efb04f28a033eb6ca80ed2babaa2f37c9afc4d524a776b3f154d96f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7492890c6dbacf64ea895246224692d73925359489fd97383c6331eb613201dc64963631a72eaa2ae708470ebf912199057f800428ca847284300da1bb091b46
|
7
|
+
data.tar.gz: 869962271b377b7e258bf013d7136befba33bb8a72272f5aee15e10af209e1be276028c344bfb2335d094f28bffaabff723c6fd8f600a6a5051e7baa0b5a9bf0
|
data/lib/Parsers/IframeParser.rb
CHANGED
@@ -76,20 +76,28 @@ class IframeParser < Parser
|
|
76
76
|
gist.gsub! '\"', '"'
|
77
77
|
gist.gsub! '<\/', '</'
|
78
78
|
gistHTML = Nokogiri::HTML(gist)
|
79
|
-
|
80
|
-
|
81
|
-
lang = "objectivec"
|
82
|
-
end
|
83
|
-
gistHTML.search('a').each do |a|
|
84
|
-
if a.text == 'view raw'
|
85
|
-
gistRAW = Request.body(Request.URL(a['href']))
|
79
|
+
|
80
|
+
lang = gistHTML.search('table').first['data-tagsearch-lang']
|
86
81
|
|
87
|
-
|
82
|
+
if !lang.nil?
|
83
|
+
lang = lang.downcase
|
84
|
+
if isForJekyll and lang == "objective-c"
|
85
|
+
lang = "objectivec"
|
86
|
+
end
|
87
|
+
gistHTML.search('a').each do |a|
|
88
|
+
if a.text == 'view raw'
|
89
|
+
gistRAW = Request.body(Request.URL(a['href']))
|
88
90
|
|
89
|
-
|
90
|
-
|
91
|
-
|
91
|
+
result = "```#{lang}\n"
|
92
|
+
|
93
|
+
result += gistRAW.chomp
|
94
|
+
|
95
|
+
result += "\n```"
|
96
|
+
end
|
92
97
|
end
|
98
|
+
else
|
99
|
+
clean_url = srce.to_s.gsub(/\.js$/, '')
|
100
|
+
result = "[#{clean_url}](#{clean_url})#{jekyllOpen}"
|
93
101
|
end
|
94
102
|
else
|
95
103
|
ogURL = url
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ZMediumToMarkdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ZhgChgLi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|