kramdown-rfc2629 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f1749f51f26c12733a7eb9683050d50bba36a60
4
- data.tar.gz: 9a64552297c893b5038e92895713267fd2f4c652
3
+ metadata.gz: 7ffb9d725b9bd9c4c3d33852c568ce6340dc40de
4
+ data.tar.gz: 0dd1aa5894b3ac6af687a44f2229996b52c11769
5
5
  SHA512:
6
- metadata.gz: 875f4bbcbed34ddf089adbbbd84d5db355d905bd1e472859e8fb5f8cbe51298f4537ab2d87ebe04109fd9e7a681d4739ece174ab2b3ad0252e8837b0e5f38610
7
- data.tar.gz: e0dd205393a4e2bd6dd3ee0b52a7f512f8de3e7fe97724f4fcb26ba4621a163776f4dfad404e4df697700f21aee474e0f844da3b118dc5cc86ffdc0dedbac57c
6
+ metadata.gz: 66995e0f81ad8fe1dd8c312363b7d437e160bb6d4b8a3bc8be52d1bd35066de5e43ec0decd2763f4e4c849a94ef1d75b06952997a1b66cf1ea2bdc9c3264ef7d
7
+ data.tar.gz: a6997a64ad2d8b2abf28811657114513fb6c695236331e3076c12f1f5304fdb732a5843539d7c5c995060cbb7630d7823077be36176f1060892199e47ca0e980
data/bin/kramdown-rfc2629 CHANGED
@@ -27,6 +27,14 @@ NMDTAGS = ["{:/nomarkdown}\n\n", "\n\n{::nomarkdown}\n"]
27
27
 
28
28
  NORMINFORM = { "!" => :normative, "?" => :informative }
29
29
 
30
+ def yaml_load(input, *args)
31
+ if YAML.respond_to?(:safe_load)
32
+ YAML.safe_load(input, *args)
33
+ else
34
+ YAML.load(input)
35
+ end
36
+ end
37
+
30
38
  def xml_from_sections(input)
31
39
 
32
40
  unless ENV["KRAMDOWN_NO_SOURCE"]
@@ -42,7 +50,7 @@ def xml_from_sections(input)
42
50
  # the first section is a YAML with front matter parameters (don't put a label here)
43
51
  # We put back the "---" plus gratuitous blank lines to hack the line number in errors
44
52
  yaml_in = input[/---\s*/] << sections.shift[2]
45
- ps = KramdownRFC::ParameterSet.new(YAML.safe_load(yaml_in, [Date], [], true))
53
+ ps = KramdownRFC::ParameterSet.new(yaml_load(yaml_in, [Date], [], true))
46
54
  coding_override = ps.has(:coding)
47
55
  smart_quotes = ps[:smart_quotes]
48
56
 
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.2.6'
3
+ s.version = '1.2.7'
4
4
  s.summary = "Kramdown extension for generating RFC 7749 XML."
5
5
  s.description = %{An RFC7749 (XML2RFC) generating backend for Thomas Leitner's
6
6
  "kramdown" markdown parser. Mostly useful for RFC writers.}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-rfc2629
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-25 00:00:00.000000000 Z
11
+ date: 2017-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown