rmake-notation 0.0.15 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rmake-notation.rb +3 -1
- data/lib/rmake-notation/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b739806c1707c16b7f019ec594a076b5f32f2789
|
4
|
+
data.tar.gz: a0be054d0efc685cb934004040b36a1fbe5e5ae4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6538bd478e18623a8138cd21b5340ba2de479386b9aaddb143a4da2547b0637fd5b3503e1cac56da8d6aab6dde67e8442f0ab33970cd22447656d248c6c61a6
|
7
|
+
data.tar.gz: 6a9da1d6e2e7477ac3486e9deed432dadf123f8f195b95325cc29b1af07162af43513287e6cac3529b822699b31373e8e5f05718861ca2ef46d3665821d7b1b5
|
data/lib/rmake-notation.rb
CHANGED
@@ -284,11 +284,13 @@ module Rmake::Notation
|
|
284
284
|
when "font"
|
285
285
|
tags = parsed_block[1] ? parsed_block[1].split("_") : []
|
286
286
|
style = ""
|
287
|
+
css_class = ''
|
287
288
|
tags.each do |tag|
|
288
289
|
if tag == "bold"
|
289
290
|
style += "font-weight:bold;"
|
290
291
|
elsif tag == "italic"
|
291
292
|
style += "font-style: italic;"
|
293
|
+
css_class = 'class="rn-italic"'
|
292
294
|
elsif tag == "strike"
|
293
295
|
style += "text-decoration:line-through;"
|
294
296
|
elsif ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"].include?(tag)
|
@@ -302,7 +304,7 @@ module Rmake::Notation
|
|
302
304
|
text_data = text_data.is_a?(Array) ? text_data.join(' ') : text_data.to_s
|
303
305
|
|
304
306
|
text = !text_data.blank? ? text_data : nil
|
305
|
-
result = "<span style=\"#{style}\">#{text}</span>"
|
307
|
+
result = "<span style=\"#{style}\" #{css_class}>#{text}</span>"
|
306
308
|
|
307
309
|
else
|
308
310
|
|