mdless 2.1.26 → 2.1.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/mdless/console.rb +11 -2
- data/lib/mdless/version.rb +1 -1
- 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: e2ff8e5c411b2dca9194b32e684495ee5a43376da035e427365c7c8c305abc3d
|
4
|
+
data.tar.gz: 7de7a979e5aeeb61cb92d3e0dfd1166aec6ac63f446422592a3a005cd6ec8755
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b458218411a7a4952652aa807c2b98cb2ea298b3f3051b4743acf1afb670c914b690e7ce97e5185cb0a86c83bdf2b3c552d7b2d8075454324ce39fef9629f9c
|
7
|
+
data.tar.gz: d44ebccb7cb2230713c7250e0dcc904961b0f7b9f0fd2f146cbaa24ca7580a748e4282dd23c8e367f6d1bb5176c4c0efa08457cc7bde02481b66c5db722bdde9
|
data/CHANGELOG.md
CHANGED
data/lib/mdless/console.rb
CHANGED
@@ -751,8 +751,17 @@ module Redcarpet
|
|
751
751
|
in_yaml = true
|
752
752
|
input.sub!(/(?i-m)^---[ \t]*\n(?<content>(?:[\s\S]*?))\n[-.]{3}[ \t]*\n/m) do
|
753
753
|
m = Regexp.last_match
|
754
|
-
MDLess.log.info('Processing YAML
|
755
|
-
|
754
|
+
MDLess.log.info('Processing YAML header')
|
755
|
+
begin
|
756
|
+
MDLess.meta = YAML.load(m['content']).map { |k, v| "#{k.downcase}" => v }
|
757
|
+
rescue Psych::DisallowedClass => e
|
758
|
+
@log.error('Error reading YAML header')
|
759
|
+
@log.error(e)
|
760
|
+
MDLess.meta = {}
|
761
|
+
rescue StandardError => e
|
762
|
+
@log.error("StandardError: #{e}")
|
763
|
+
end
|
764
|
+
|
756
765
|
lines = m[0].split(/\n/)
|
757
766
|
longest = lines.longest_element.length
|
758
767
|
longest = longest < MDLess.cols ? longest + 1 : MDLess.cols
|
data/lib/mdless/version.rb
CHANGED