jekyll-img-converter 0.1.0 → 0.1.1

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/jekyll-img-converter.rb +7 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d49545c175311c1e7e166cd8aee4455d5877a37
4
- data.tar.gz: 1ea6855fe4f412e7046f89eeb19e50f849525631
3
+ metadata.gz: b00a406b9d6b2ab3f5a86f9b2387b090a84f4bf7
4
+ data.tar.gz: 2f7203597e1f7d361557bf619118137599884352
5
5
  SHA512:
6
- metadata.gz: e26907b990f9359116fdff02c9ce93ed73ef9470e57a904d11c3626bd41ad823ef24e4de7329364d6b108dd19362bc167969ccf7be36717b6fd768cc7dea450b
7
- data.tar.gz: 5c9308d2dac4816663030e8b047f666053a36a532c684636f0e2b1f4f1c9e44fd93b9929f4a446e5e26fcc9c5a480940638bef1585cb1dc13b50ec7b09ba7bba
6
+ metadata.gz: d7a9e5f06a4cd7ff81e65f2ee7b4ec502a1d86ec3b610aff9a054c49ca7c7afba2c56f7ef87fb9fe54e16728ada07d762135100243068d2388187ed5536d4393
7
+ data.tar.gz: 402a0939a2e430ca2ed0e0912af1e5c48f86f5e5daf829d3814a888493b9e0e3420c9ae6f1541b02cc7e00db2faa0a7c88c0a9effe63d5b2f2324c1e129c1bdb
@@ -9,17 +9,19 @@ module Jekyll
9
9
  # content &&= content
10
10
  pattern = /({)(.+)(})/
11
11
  matchData = pattern.match(content)
12
- stripContent = content.gsub(matchData[0],'')
13
-
12
+
14
13
  imgTag = "<img src=\"#{link}\""
14
+
15
15
  if (matchData)
16
- imgTag = imgTag + " alt=\"#{stripContent}\" style=\"#{matchData[0]}\""
16
+ style = matchData[0]
17
+ stripContent = content.gsub(style,'')
18
+ imgTag += " alt=\"#{stripContent}\" style=\"#{style}\""
17
19
  else
18
- imgTag = imgTag + " alt=\"#{content}\""
20
+ imgTag += " alt=\"#{content}\""
19
21
  end
20
22
 
21
23
  if(title)
22
- imgTag = imgTag = " title=\"#{title}\""
24
+ imgTag += " title=\"#{title}\""
23
25
  end
24
26
 
25
27
  imgTag = imgTag + "/>"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-img-converter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SungKwang Song