ZMediumToMarkdown 1.7.5 → 1.7.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/Parsers/IMGParser.rb +7 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c346ebddf4a54f030cce4ea3248ccf3fe9d2f564f02a2d43771224677385f94a
4
- data.tar.gz: 5a69488e4d00b56480237693bff409ee8890039ef7e9470df5226882af64a7c1
3
+ metadata.gz: f8d93a8c503846adfc16a522538443ff0d7cccdac9f762e1820c6a126577ae01
4
+ data.tar.gz: ea3da670c30cb61dd06035f8a39983ff6d2e54a45273d0cc0da547e85102f47c
5
5
  SHA512:
6
- metadata.gz: e078b4d7d914cee844222f45dcbbd0fb756d52786e01c15cbcc5495356b35b48dca9c7d303b4fa9c2e1c11e8086f1751b4cc6df8c759573432fd546491c4a60b
7
- data.tar.gz: 586e5b2e6b6a9947ff73237edfde4c4786853eac3ec513ef089e12b018c3cc27feca53ca584f9f9ed63d74bb1990dbd3219ff02ca92744a8f142a0827d3b634d
6
+ metadata.gz: 855b53acb24236730b4812e48af9b4126efd925a154e72247a69a3fc8204f10f2ac8b1a7021a56b20eeef64e6b64d19822df9dd9f35a935ce7f238140f5ddbe2
7
+ data.tar.gz: 3fb8201543caee6f2e6621492db112a951863f5c93b9f6a0f5ac7c592aebbcabfbfdbdbf5d57329d6bfafe3611ce84c2225ef78236248dd020b13efd952f2990
@@ -24,16 +24,20 @@ class IMGParser < Parser
24
24
  absolutePath = imagePathPolicy.getAbsolutePath(fileName)
25
25
 
26
26
  result = ""
27
+ alt = ""
28
+ if paragraph.orgText != ""
29
+ alt = " \"#{paragraph.orgText}\""
30
+ end
27
31
 
28
32
  if ImageDownloader.download(absolutePath, imageURL)
29
33
  relativePath = "#{pathPolicy.getRelativePath(nil)}/#{imagePathPolicy.getRelativePath(fileName)}"
30
34
  if isForJekyll
31
- result = "\r\n![#{paragraph.orgText}](/#{relativePath} \"#{paragraph.orgText}\")\r\n"
35
+ result = "\r\n![#{paragraph.orgText}](/#{relativePath}#{alt})\r\n"
32
36
  else
33
- result = "\r\n![#{paragraph.orgText}](#{relativePath} \"#{paragraph.orgText}\")\r\n"
37
+ result = "\r\n![#{paragraph.orgText}](#{relativePath}#{alt})\r\n"
34
38
  end
35
39
  else
36
- result = "\r\n![#{paragraph.orgText}](#{imageURL} \"#{paragraph.orgText}\")\r\n"
40
+ result = "\r\n![#{paragraph.orgText}](#{imageURL}#{alt})\r\n"
37
41
  end
38
42
 
39
43
  if paragraph.text != ""
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: 1.7.5
4
+ version: 1.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ZhgChgLi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-12 00:00:00.000000000 Z
11
+ date: 2022-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri