pandocomatic 0.1.4.12 → 0.1.4.13
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/pandocomatic/pandoc_metadata.rb +3 -2
- data/lib/pandocomatic/pandocomatic.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: 752daaef851703068d16cdd487acfeefb4a6293b
|
|
4
|
+
data.tar.gz: c687aad05f4172a877ee2ade5992514eeccbc51b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6292e4a759659de493b53248064a2d68e8794d4ae006e9614033785bb95f23ff17958acc9ab51f2a3a91eec48ba26dd45690628d6e66d79e78ec34c809ad1371
|
|
7
|
+
data.tar.gz: fcf0da16939615bcd039bc5fe221a3aa384e4b0b257ed077115a2ab263d5bbaa295642afa9aed03a85e816a5330c1045542649f93d51f1402d947be6bba004d1
|
|
@@ -46,8 +46,9 @@ module Pandocomatic
|
|
|
46
46
|
# @param input [String] the input string
|
|
47
47
|
# @return [String] the YAML data embedded in the input string
|
|
48
48
|
def self.pandoc2yaml(input)
|
|
49
|
-
input
|
|
50
|
-
|
|
49
|
+
mined_metadata = input.scan(/^---[ \t]*(\r\n|\r|\n)(.+?)^(?:---|\.\.\.)[ \t]*(\r\n|\r|\n)/m)
|
|
50
|
+
|
|
51
|
+
mined_metadata
|
|
51
52
|
.flatten
|
|
52
53
|
.map{|yaml| yaml.strip}
|
|
53
54
|
.join("\n")
|