prawndown-ext 0.1.2 → 0.1.3
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/prawndown/parser.rb +1 -1
- data/lib/prawndown/version.rb +1 -1
- data/lib/prawndown-ext.rb +6 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd619d59e60b9e2febbd337fe13b2305e715f114595ceeef87696b8785a41ff4
|
4
|
+
data.tar.gz: 49756da2ec59eb28a26c59b858fd8e25f7ed0032c46aca28899afdd1d43a0ede
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7270965459f9fe64cffb85b19bcbdf4e3a0b6965c66f23c4485a52b5719f9d68e78c50f4e267b450e6037e29d5bf9be0ce93ffc4ede4ef032c0a050ce6794ae5
|
7
|
+
data.tar.gz: 85c9aecc4f40b3a3ecc88de4a484b30fd1721b8d5d9954c6c473ecb59ca22fb245ddbe51740114b6c6b39be36068264359f0a06cd869f666b1b9616a426918e8
|
data/lib/prawndown/parser.rb
CHANGED
@@ -19,7 +19,7 @@ module PrawndownExt
|
|
19
19
|
|
20
20
|
# Images
|
21
21
|
/!\[([^\[]+)\]\(([^\)]+)\)/ => '<command_break>{"command":"img", "alt":"\1", "path":"\2"}<command_break>',
|
22
|
-
/^> (.+)/ => '<command_break>{"command":"quote","margin":
|
22
|
+
/^> (.+)/ => '<command_break>{"command":"quote","margin":20,"text":"\\1"}<command_break>', # Quote
|
23
23
|
|
24
24
|
# Stuff to process last
|
25
25
|
/\[([^\[]+)\]\(([^\)]+)\)/ => '<link href="\2">\1</link>', # Link
|
data/lib/prawndown/version.rb
CHANGED
data/lib/prawndown-ext.rb
CHANGED
@@ -17,18 +17,15 @@ module PrawndownExt
|
|
17
17
|
|
18
18
|
def self.cl_text args, pdf
|
19
19
|
|
20
|
-
pdf.text args["text"]
|
20
|
+
pdf.text args["text"], inline_format: true
|
21
21
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def self.cl_text_box args, pdf
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
pdf.text(args["text"])
|
31
|
-
|
25
|
+
pdf.pad args["margin"] do
|
26
|
+
pdf.indent args["margin"], args["margin"] do
|
27
|
+
pdf.text args["text"], inline_format: true
|
28
|
+
end
|
32
29
|
end
|
33
30
|
|
34
31
|
end
|
@@ -53,7 +50,7 @@ module PrawndownExt
|
|
53
50
|
end
|
54
51
|
|
55
52
|
def unescape_text text
|
56
|
-
text = text.gsub('\\"', '
|
53
|
+
text = text.gsub('\\"', '"')
|
57
54
|
end
|
58
55
|
|
59
56
|
# Renders Markdown in the current document
|