kramdown-rfc2629 1.6.10 → 1.6.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kramdown-rfc2629.gemspec +1 -1
- data/lib/kramdown-rfc/command.rb +5 -0
- data/lib/kramdown-rfc2629.rb +6 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b52ce81714c14272005b47807396c6cac7764fa7a2931ca93b2661dfb479d4cf
|
4
|
+
data.tar.gz: a99b8e49ba4145ca88690ca0af1a1c6549c25a995cbfcb008763adea8a0b7b5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6204f7e5f2bbfebd84c4b3b068819008a66535948e5bf8f8eefdfe8a010ec69cde2cf910c0cec73ef74b9f75feb6e5d96d57519dd2e30f5a255406de82b10491
|
7
|
+
data.tar.gz: 3b595453599f3c33b44a2834ec4bea7306d48b2e6a3a0f1af27843e92013428e03341c20fe5d9f8b6398acca6a39c31890678d9afc1fa99f76eb2511eb72a27c
|
data/kramdown-rfc2629.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = 'kramdown-rfc2629'
|
3
|
-
s.version = '1.6.
|
3
|
+
s.version = '1.6.13'
|
4
4
|
s.summary = "Kramdown extension for generating RFCXML (RFC 799x)."
|
5
5
|
s.description = %{An RFCXML (RFC 799x) generating backend for Thomas Leitner's
|
6
6
|
"kramdown" markdown parser. Mostly useful for RFC writers.}
|
data/lib/kramdown-rfc/command.rb
CHANGED
@@ -149,6 +149,7 @@ NMDTAGS = ["{:/nomarkdown}\n\n", "\n\n{::nomarkdown}\n"]
|
|
149
149
|
NORMINFORM = { "!" => :normative, "?" => :informative }
|
150
150
|
|
151
151
|
def yaml_load(input, *args)
|
152
|
+
begin
|
152
153
|
if YAML.respond_to?(:safe_load)
|
153
154
|
begin
|
154
155
|
YAML.safe_load(input, *args)
|
@@ -158,6 +159,10 @@ def yaml_load(input, *args)
|
|
158
159
|
else
|
159
160
|
YAML.load(input)
|
160
161
|
end
|
162
|
+
rescue Psych::SyntaxError => e
|
163
|
+
warn "*** YAML syntax error: #{e}"
|
164
|
+
exit 65 # EX_DATAERR
|
165
|
+
end
|
161
166
|
end
|
162
167
|
|
163
168
|
def process_kramdown_options(coding_override = nil,
|
data/lib/kramdown-rfc2629.rb
CHANGED
@@ -14,7 +14,7 @@ raise "sorry, 1.8 was last decade" unless RUBY_VERSION >= '1.9'
|
|
14
14
|
|
15
15
|
gem 'kramdown', '~> 2.4.0'
|
16
16
|
require 'kramdown'
|
17
|
-
my_span_elements = %w{list
|
17
|
+
my_span_elements = %w{list xref eref iref cref spanx vspace}
|
18
18
|
Kramdown::Parser::Html::Constants::HTML_SPAN_ELEMENTS.concat my_span_elements
|
19
19
|
|
20
20
|
require 'rexml/parsers/baseparser'
|
@@ -37,7 +37,7 @@ module Kramdown
|
|
37
37
|
def replace_abbreviations(el, regexps = nil)
|
38
38
|
unless regexps # DUPLICATED AND MODIFIED CODE FROM UPSTREAM, CHECK ON UPSTREAM UPGRADE
|
39
39
|
sorted_abbrevs = @root.options[:abbrev_defs].keys.sort {|a, b| b.length <=> a.length }
|
40
|
-
regexps = [Regexp.union(*sorted_abbrevs.map {|k|
|
40
|
+
regexps = [Regexp.union(*sorted_abbrevs.map {|k|
|
41
41
|
/#{Regexp.escape(k).gsub(/\\\s/, "[\\s\\p{Z}]+").force_encoding(Encoding::UTF_8)}/})]
|
42
42
|
# warn regexps.inspect
|
43
43
|
regexps << /(?=(?:\W|^)#{regexps.first}(?!\w))/ # regexp should only match on word boundaries
|
@@ -721,7 +721,7 @@ COLORS
|
|
721
721
|
if sl = el.attr.delete('slugifiedName') # could do general name- play
|
722
722
|
attrstring = html_attributes({'slugifiedName' => sl})
|
723
723
|
end
|
724
|
-
# noabbrev: true -- Workaround for https://
|
724
|
+
# noabbrev: true -- Workaround for https://github.com/ietf-tools/xml2rfc/issues/683
|
725
725
|
nm = inner(el, indent, opts.merge(noabbrev: true))
|
726
726
|
if ttl = el.attr['title']
|
727
727
|
warn "*** Section has two titles: >>#{ttl}<< and >>#{nm}<<"
|
@@ -1057,7 +1057,7 @@ COLORS
|
|
1057
1057
|
def self.bcp_std_ref(t, n)
|
1058
1058
|
warn "*** #{t} anchors not supported in v2 format" unless $options.v3
|
1059
1059
|
[name = "reference.#{t}.#{"%04d" % n.to_i}.xml",
|
1060
|
-
"#{XML_RESOURCE_ORG_PREFIX}/bibxml-rfcsubseries
|
1060
|
+
"#{XML_RESOURCE_ORG_PREFIX}/bibxml-rfcsubseries/#{name}"] # FOR NOW
|
1061
1061
|
end
|
1062
1062
|
|
1063
1063
|
# [subdirectory name, cache ttl in seconds, does it provide for ?anchor=]
|
@@ -1094,7 +1094,8 @@ COLORS
|
|
1094
1094
|
}
|
1095
1095
|
|
1096
1096
|
# XML_RESOURCE_ORG_HOST = ENV["XML_RESOURCE_ORG_HOST"] || "xml.resource.org"
|
1097
|
-
XML_RESOURCE_ORG_HOST = ENV["XML_RESOURCE_ORG_HOST"] || "xml2rfc.tools.ietf.org"
|
1097
|
+
# XML_RESOURCE_ORG_HOST = ENV["XML_RESOURCE_ORG_HOST"] || "xml2rfc.tools.ietf.org"
|
1098
|
+
XML_RESOURCE_ORG_HOST = ENV["XML_RESOURCE_ORG_HOST"] || "bib.ietf.org"
|
1098
1099
|
XML_RESOURCE_ORG_PREFIX = ENV["XML_RESOURCE_ORG_PREFIX"] ||
|
1099
1100
|
"https://#{XML_RESOURCE_ORG_HOST}/public/rfc"
|
1100
1101
|
KRAMDOWN_USE_TOOLS_SERVER = ENV["KRAMDOWN_USE_TOOLS_SERVER"]
|
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.6.
|
4
|
+
version: 1.6.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carsten Bormann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|