kramdown-rfc2629 1.3.17 → 1.3.23

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eaff5274766d9c9fe2de618bc8ed0f2d86cb1a7a9413e0de92568e1cdca2df30
4
- data.tar.gz: e519ff100dbfbbae7881100d023ee2f370805d84c7ee9e49beadfa99b02a72d7
3
+ metadata.gz: f07194d52bdfea697e714e5775fc5d668f153eb7bad63503ef7b582bf43c7e0b
4
+ data.tar.gz: e92c7dc7adcf6a2cf45d234c382d7196e7b20fcfbbae650df0a7a0d341f8e0fc
5
5
  SHA512:
6
- metadata.gz: b178e930deec32e6951277d9162453643be47fd6b87719f517ed05dd87c3e63414e7b3db1ed2258edf52b6b82fd11f07d371276c9624f17a43a3b721fef21ad6
7
- data.tar.gz: 22d55e1830b09db10b297700021b98d110204414b79225509b59818a2feefb48a4fed9a8be2b4cfe23547f788a63f3fc7fa7535c9a027fa059ada59dd77b6d72
6
+ metadata.gz: a20a4204e3b2b3bc571814508309857c6a4a0bea9fb66bf2424d9a08ce425cfc7ff8d9ab007ac51471a45e8916ae11c9e47a7b070386967e8def1eae24cb1b00
7
+ data.tar.gz: 80cec91ada39501a454d92b02aa0f786293342272654d0758789feebcd27e0f7476b3607e985038887f0f44ea5c88b9f345d91c4e3fd778430617d98daf7e091
data/bin/kdrfc CHANGED
@@ -121,6 +121,9 @@ BANNER
121
121
  opts.on("-p", "--[no-]prep", "Convert xml to prepped xml") do |v|
122
122
  $options.prep = v
123
123
  end
124
+ opts.on("-c", "--[no-]convert", "Convert xml to v3 xml") do |v|
125
+ $options.v2v3 = v
126
+ end
124
127
  opts.on("-h", "--[no-]html", "Convert to html as well") do |v|
125
128
  $options.html = v
126
129
  end
@@ -135,6 +138,7 @@ op.parse!
135
138
 
136
139
  def process_the_xml(fn, base)
137
140
  process_xml(fn, "#{base}.prepped.xml", "--preptool") if $options.prep
141
+ process_xml(fn, "#{base}.v2v3.xml", "--v2v3") if $options.v2v3
138
142
  process_xml(fn, "#{base}.txt") if $options.txt
139
143
  process_xml(fn, "#{base}.html", "--html") if $options.html
140
144
  end
@@ -0,0 +1 @@
1
+ {"replacements":[["\\textfractionsolidus","⁄"],["\\leftrightsquigarrow","↭"],["\\textpertenthousand","‱"],["\\blacktriangleright","▸"],["\\blacktriangledown","▾"],["\\blacktriangleleft","◂"],["\\twoheadrightarrow","↠"],["\\leftrightharpoons","⇋"],["\\rightleftharpoons","⇌"],["\\textreferencemark","※"],["\\circlearrowright","↻"],["\\rightrightarrows","⇉"],["\\vartriangleright","⊳"],["\\textordmasculine","º"],["\\textvisiblespace","␣"],["\\twoheadleftarrow","↞"],["\\downharpoonright","⇂"],["\\ntrianglerighteq","⋭"],["\\rightharpoondown","⇁"],["\\textperthousand","‰"],["\\leftrightarrows","⇆"],["\\textmusicalnote","♪"],["\\nleftrightarrow","↮"],["\\rightleftarrows","⇄"],["\\bigtriangledown","▽"],["\\textordfeminine","ª"],["\\ntrianglelefteq","⋬"],["\\rightthreetimes","⋌"],["\\trianglerighteq","⊵"],["\\vartriangleleft","⊲"],["\\rightsquigarrow","⇝"],["\\downharpoonleft","⇃"],["\\curvearrowright","↷"],["\\circlearrowleft","↺"],["\\leftharpoondown","↽"],["\\nLeftrightarrow","⇎"],["\\curvearrowleft","↶"],["\\guilsinglright","›"],["\\leftthreetimes","⋋"],["\\leftrightarrow","↔"],["\\rightharpoonup","⇀"],["\\guillemotright","»"],["\\downdownarrows","⇊"],["\\hookrightarrow","↪"],["\\hspace{0.25em}"," "],["\\dashrightarrow","⇢"],["\\leftleftarrows","⇇"],["\\trianglelefteq","⊴"],["\\ntriangleright","⋫"],["\\doublebarwedge","⌆"],["\\upharpoonright","↾"],["\\rightarrowtail","↣"],["\\looparrowright","↬"],["\\Leftrightarrow","⇔"],["\\sphericalangle","∢"],["\\divideontimes","⋇"],["\\measuredangle","∡"],["\\blacktriangle","▴"],["\\ntriangleleft","⋪"],["\\mathchar\"1356","⁁"],["\\texttrademark","™"],["\\mathchar\"2208","⌖"],["\\triangleright","▹"],["\\leftarrowtail","↢"],["\\guilsinglleft","‹"],["\\upharpoonleft","↿"],["\\mathbb{gamma}","ℽ"],["\\fallingdotseq","≒"],["\\looparrowleft","↫"],["\\textbrokenbar","¦"],["\\hookleftarrow","↩"],["\\smallsetminus","﹨"],["\\dashleftarrow","⇠"],["\\guillemotleft","«"],["\\leftharpoonup","↼"],["\\mathbb{Gamma}","ℾ"],["\\bigtriangleup","△"],["\\textcircledP","℗"],["\\risingdotseq","≓"],["\\triangleleft","◃"],["\\mathsterling","£"],["\\textcurrency","¤"],["\\triangledown","▿"],["\\blacklozenge",""],["\\sfrac{5}{6}","⅚"],["\\preccurlyeq","≼"],["\\Rrightarrow","⇛"],["\\circledcirc","⊚"],["\\nRightarrow","⇏"],["\\sfrac{3}{8}","⅜"],["\\sfrac{1}{3}","⅓"],["\\sfrac{2}{5}","⅖"],["\\vartriangle","▵"],["\\Updownarrow","⇕"],["\\nrightarrow","↛"],["\\sfrac{1}{2}","½"],["\\sfrac{3}{5}","⅗"],["\\succcurlyeq","≽"],["\\sfrac{4}{5}","⅘"],["\\diamondsuit","♦"],["\\hphantom{0}"," "],["\\sfrac{1}{6}","⅙"],["\\curlyeqsucc","⋟"],["\\blacksquare","▪"],["\\hphantom{,}"," "],["\\curlyeqprec","⋞"],["\\sfrac{1}{8}","⅛"],["\\sfrac{7}{8}","⅞"],["\\sfrac{1}{5}","⅕"],["\\sfrac{2}{3}","⅔"],["\\updownarrow","↕"],["\\backepsilon","∍"],["\\circleddash","⊝"],["\\eqslantless","⋜"],["\\sfrac{3}{4}","¾"],["\\sfrac{5}{8}","⅝"],["\\hspace{1pt}"," "],["\\sfrac{1}{4}","¼"],["\\mathbb{Pi}","ℿ"],["\\mathcal{M}","ℳ"],["\\mathcal{o}","ȓ4"],["\\mathcal{O}","ᵊA"],["\\nsupseteqq","⊉"],["\\mathcal{B}","ℬ"],["\\textrecipe","℞"],["\\nsubseteqq","⊈"],["\\subsetneqq","⊊"],["\\mathcal{I}","ℑ"],["\\upuparrows","⇈"],["\\mathcal{e}","ℯ"],["\\mathcal{L}","ℒ"],["\\nleftarrow","↚"],["\\mathcal{H}","ℋ"],["\\mathcal{E}","ℰ"],["\\eqslantgtr","⋝"],["\\curlywedge","⋏"],["\\varepsilon","ε"],["\\supsetneqq","⊋"],["\\rightarrow","→"],["\\mathcal{R}","ℛ"],["\\sqsubseteq","⊑"],["\\mathcal{g}","ℊ"],["\\sqsupseteq","⊒"],["\\complement","∁"],["\\Rightarrow","⇒"],["\\gtreqqless","⋛"],["\\lesseqqgtr","⋚"],["\\circledast","⊛"],["\\nLeftarrow","⇍"],["\\Lleftarrow","⇚"],["\\varnothing","∅"],["\\mathcal{N}","𝒩"],["\\Leftarrow","⇐"],["\\gvertneqq","≩"],["\\mathbb{C}","ℂ"],["\\supsetneq","⊋"],["\\leftarrow","←"],["\\nleqslant","≰"],["\\mathbb{Q}","ℚ"],["\\mathbb{Z}","ℤ"],["\\llbracket","〚"],["\\mathbb{H}","ℍ"],["\\spadesuit","♠"],["\\mathit{o}","ℴ"],["\\mathbb{P}","ℙ"],["\\rrbracket","〛"],["\\supseteqq","⊇"],["\\copyright","©"],["\\textsc{k}","ĸ"],["\\gtreqless","⋛"],["\\mathbb{j}","ⅉ"],["\\pitchfork","⋔"],["\\estimated","℮"],["\\ngeqslant","≱"],["\\mathbb{e}","ⅇ"],["\\therefore","∴"],["\\triangleq","≜"],["\\varpropto","∝"],["\\subsetneq","⊊"],["\\heartsuit","♥"],["\\mathbb{d}","ⅆ"],["\\lvertneqq","≨"],["\\checkmark","✓"],["\\nparallel","∦"],["\\mathbb{R}","ℝ"],["\\lesseqgtr","⋚"],["\\downarrow","↓"],["\\mathbb{D}","ⅅ"],["\\mathbb{i}","ⅈ"],["\\backsimeq","⋍"],["\\mathbb{N}","ℕ"],["\\Downarrow","⇓"],["\\subseteqq","⊆"],["\\setminus","∖"],["\\succnsim","⋩"],["\\doteqdot","≑"],["\\clubsuit","♣"],["\\emptyset","∅"],["\\sqsupset","⊐"],["\\fbox{~~}","▭"],["\\curlyvee","⋎"],["\\varkappa","ϰ"],["\\llcorner","⌞"],["\\varsigma","ς"],["\\approxeq","≊"],["\\backcong","≌"],["\\supseteq","⊇"],["\\circledS","Ⓢ"],["\\circledR","®"],["\\textcent","¢"],["\\urcorner","⌝"],["\\lrcorner","⌟"],["\\boxminus","⊟"],["\\texteuro","€"],["\\vartheta","ϑ"],["\\barwedge","⊼"],["\\ding{86}","✶"],["\\sqsubset","⊏"],["\\subseteq","⊆"],["\\intercal","⊺"],["\\ding{73}","☆"],["\\ulcorner","⌜"],["\\recorder","⌕"],["\\precnsim","⋨"],["\\parallel","∥"],["\\boxtimes","⊠"],["\\ding{55}","✗"],["\\multimap","⊸"],["\\maltese","✠"],["\\nearrow","↗"],["\\swarrow","↙"],["\\lozenge","◊"],["\\sqrt[3]","∛"],["\\succsim","≿"],["\\dotplus","∔"],["\\tilde{}","~"],["\\check{}","ˇ"],["\\lessgtr","≶"],["\\Upsilon","ϒ"],["\\Cdprime","Ъ"],["\\gtrless","≷"],["\\backsim","∽"],["\\nexists","∄"],["\\dotplus","∔"],["\\searrow","↘"],["\\lessdot","⋖"],["\\boxplus","⊞"],["\\upsilon","υ"],["\\epsilon","ε"],["\\diamond","⋄"],["\\bigstar","★"],["\\ddagger","‡"],["\\cdprime","ъ"],["\\Uparrow","⇑"],["\\sqrt[4]","∜"],["\\between","≬"],["\\sqangle","∟"],["\\digamma","Ϝ"],["\\uparrow","↑"],["\\nwarrow","↖"],["\\precsim","≾"],["\\breve{}","˘"],["\\because","∵"],["\\bigcirc","◯"],["\\acute{}","´"],["\\grave{}","`"],["\\check{}","ˇ"],["\\lesssim","≲"],["\\partial","∂"],["\\natural","♮"],["\\supset","⊃"],["\\hstrok","ħ"],["\\Tstrok","Ŧ"],["\\coprod","∐"],["\\models","⊧"],["\\otimes","⊗"],["\\degree","°"],["\\gtrdot","⋗"],["\\preceq","≼"],["\\Lambda","Λ"],["\\lambda","λ"],["\\cprime","ь"],["\\varrho","ϱ"],["\\Bumpeq","≎"],["\\hybull","⁃"],["\\lmidot","ŀ"],["\\nvdash","⊬"],["\\lbrace","{"],["\\bullet","•"],["\\varphi","φ"],["\\bumpeq","≏"],["\\ddot{}","¨"],["\\Lmidot","Ŀ"],["\\Cprime","Ь"],["\\female","♀"],["\\rtimes","⋊"],["\\gtrsim","≳"],["\\mapsto","↦"],["\\daleth","ℸ"],["\\square","■"],["\\nVDash","⊯"],["\\rangle","〉"],["\\tstrok","ŧ"],["\\oslash","⊘"],["\\ltimes","⋉"],["\\lfloor","⌊"],["\\marker","▮"],["\\Subset","⋐"],["\\Vvdash","⊪"],["\\propto","∝"],["\\Hstrok","Ħ"],["\\dlcrop","⌍"],["\\forall","∀"],["\\nVdash","⊮"],["\\Supset","⋑"],["\\langle","〈"],["\\ominus","⊖"],["\\rfloor","⌋"],["\\circeq","≗"],["\\eqcirc","≖"],["\\drcrop","⌌"],["\\veebar","⊻"],["\\ulcrop","⌏"],["\\nvDash","⊭"],["\\urcrop","⌎"],["\\exists","∃"],["\\approx","≈"],["\\dagger","†"],["\\boxdot","⊡"],["\\succeq","≽"],["\\bowtie","⋈"],["\\subset","⊂"],["\\Sigma","Σ"],["\\Omega","Ω"],["\\nabla","∇"],["\\colon",":"],["\\boxHu","╧"],["\\boxHd","╤"],["\\aleph","ℵ"],["\\gnsim","⋧"],["\\boxHU","╩"],["\\boxHD","╦"],["\\equiv","≡"],["\\lneqq","≨"],["\\alpha","α"],["\\amalg","∐"],["\\boxhU","╨"],["\\boxhD","╥"],["\\uplus","⊎"],["\\boxhu","┴"],["\\kappa","κ"],["\\sigma","σ"],["\\boxDL","╗"],["\\Theta","Θ"],["\\Vdash","⊩"],["\\boxDR","╔"],["\\boxDl","╖"],["\\sqcap","⊓"],["\\boxDr","╓"],["\\bar{}","¯"],["\\dashv","⊣"],["\\vDash","⊨"],["\\boxdl","┐"],["\\boxVl","╢"],["\\boxVh","╫"],["\\boxVr","╟"],["\\boxdr","┌"],["\\boxdL","╕"],["\\boxVL","╣"],["\\boxVH","╬"],["\\boxVR","╠"],["\\boxdR","╒"],["\\theta","θ"],["\\lhblk","▄"],["\\uhblk","▀"],["\\ldotp","."],["\\ldots","…"],["\\boxvL","╡"],["\\boxvH","╪"],["\\boxvR","╞"],["\\boxvl","┤"],["\\boxvh","┼"],["\\boxvr","├"],["\\Delta","Δ"],["\\boxUR","╚"],["\\boxUL","╝"],["\\oplus","⊕"],["\\boxUr","╙"],["\\boxUl","╜"],["\\doteq","≐"],["\\happy","㋡"],["\\varpi","ϖ"],["\\smile","☺"],["\\boxul","┘"],["\\simeq","≃"],["\\boxuR","╘"],["\\boxuL","╛"],["\\boxhd","┬"],["\\gimel","ℷ"],["\\Gamma","Γ"],["\\lnsim","⋦"],["\\sqcup","⊔"],["\\omega","ω"],["\\sharp","♯"],["\\times","×"],["\\block","█"],["\\hat{}","^"],["\\wedge","∧"],["\\vdash","⊢"],["\\angle","∠"],["\\infty","∞"],["\\gamma","γ"],["\\asymp","≍"],["\\rceil","⌉"],["\\dot{}","˙"],["\\lceil","⌈"],["\\delta","δ"],["\\gneqq","≩"],["\\frown","⌢"],["\\phone","☎"],["\\vdots","⋮"],["\\boxr","└"],["\\k{i}","į"],["\\`{I}","Ì"],["\\perp","⊥"],["\\\"{o}","ö"],["\\={I}","Ī"],["\\`{a}","à"],["\\v{T}","Ť"],["\\surd","√"],["\\H{O}","Ő"],["\\vert","|"],["\\k{I}","Į"],["\\\"{y}","ÿ"],["\\\"{O}","Ö"],["\\'{Y}","Ý"],["\\u{u}","ў"],["\\u{G}","Ğ"],["\\.{E}","Ė"],["\\.{z}","ż"],["\\v{t}","ť"],["\\prec","≺"],["\\H{o}","ő"],["\\mldr","…"],["\\'{y}","ý"],["\\cong","≅"],["\\.{e}","ė"],["\\'{L}","Ĺ"],["\\star","*"],["\\.{Z}","Ż"],["\\'{e}","é"],["\\geqq","≧"],["\\cdot","⋅"],["\\`{U}","Ù"],["\\'{l}","ĺ"],["\\v{L}","Ľ"],["\\c{s}","ş"],["\\'{s}","ś"],["\\~{A}","Ã"],["\\Vert","‖"],["\\k{e}","ę"],["\\lnot","¬"],["\\'{z}","ź"],["\\leqq","≦"],["\\beta","β"],["\\beth","ℶ"],["\\'{E}","É"],["\\~{n}","ñ"],["\\u{i}","й"],["\\c{S}","Ş"],["\\c{N}","Ņ"],["\\H{u}","ű"],["\\v{n}","ň"],["\\'{S}","Ś"],["\\={U}","Ū"],["\\~{O}","Õ"],["\\'{Z}","Ź"],["\\v{E}","Ě"],["\\'{R}","Ŕ"],["\\H{U}","Ű"],["\\v{N}","Ň"],["\\prod","∏"],["\\v{s}","š"],["\\\"{U}","Ü"],["\\c{n}","ņ"],["\\k{U}","Ų"],["\\c{R}","Ŗ"],["\\'{A}","Á"],["\\~{o}","õ"],["\\v{e}","ě"],["\\v{S}","Š"],["\\u{A}","Ă"],["\\circ","∘"],["\\\"{u}","ü"],["\\flat","♭"],["\\v{z}","ž"],["\\r{U}","Ů"],["\\`{O}","Ò"],["\\={u}","ū"],["\\oint","∮"],["\\c{K}","Ķ"],["\\k{u}","ų"],["\\not<","≮"],["\\not>","≯"],["\\`{o}","ò"],["\\\"{I}","Ï"],["\\v{D}","Ď"],["\\.{G}","Ġ"],["\\r{u}","ů"],["\\not=","≠"],["\\`{u}","ù"],["\\v{c}","č"],["\\c{k}","ķ"],["\\.{g}","ġ"],["\\'{N}","Ń"],["\\odot","⊙"],["\\`{e}","э"],["\\c{T}","Ţ"],["\\v{d}","ď"],["\\\"{e}","ё"],["\\'{I}","Í"],["\\v{R}","Ř"],["\\k{a}","ą"],["\\nldr","‥"],["\\`{A}","À"],["\\'{n}","ń"],["\\~{N}","Ñ"],["\\nmid","∤"],["\\.{C}","Ċ"],["\\zeta","ζ"],["\\~{u}","ũ"],["\\`{E}","Э"],["\\~{a}","ã"],["\\c{t}","ţ"],["\\={o}","ō"],["\\v{r}","ř"],["\\={A}","Ā"],["\\.{c}","ċ"],["\\~{U}","Ũ"],["\\k{A}","Ą"],["\\\"{a}","ä"],["\\u{U}","Ў"],["\\iota","ι"],["\\={O}","Ō"],["\\c{C}","Ç"],["\\gneq","≩"],["\\'{c}","ć"],["\\boxH","═"],["\\hbar","ℏ"],["\\\"{A}","Ä"],["\\boxv","│"],["\\boxh","─"],["\\male","♂"],["\\'{u}","ú"],["\\sqrt","√"],["\\succ","≻"],["\\c{c}","ç"],["\\'{C}","Ć"],["\\v{l}","ľ"],["\\u{a}","ă"],["\\v{Z}","Ž"],["\\'{o}","ó"],["\\c{G}","Ģ"],["\\v{C}","Č"],["\\lneq","≨"],["\\\"{E}","Ё"],["\\={a}","ā"],["\\c{l}","ļ"],["\\'{a}","á"],["\\={E}","Ē"],["\\boxV","║"],["\\u{g}","ğ"],["\\'{O}","Ó"],["\\'{g}","ǵ"],["\\u{I}","Й"],["\\c{L}","Ļ"],["\\k{E}","Ę"],["\\.{I}","İ"],["\\~{I}","Ĩ"],["\\quad"," "],["\\c{r}","ŗ"],["\\'{r}","ŕ"],["\\\"{Y}","Ÿ"],["\\={e}","ē"],["\\'{U}","Ú"],["\\leq","≤"],["\\Cup","⋓"],["\\Psi","Ψ"],["\\neq","≠"],["\\k{}","˛"],["\\={}","‾"],["\\H{}","˝"],["\\cup","∪"],["\\geq","≥"],["\\mho","℧"],["\\Dzh","Џ"],["\\cap","∩"],["\\bot","⊥"],["\\psi","ψ"],["\\chi","χ"],["\\c{}","¸"],["\\Phi","Φ"],["\\ast","*"],["\\ell","ℓ"],["\\top","⊤"],["\\lll","⋘"],["\\tau","τ"],["\\Cap","⋒"],["\\sad","☹"],["\\iff","⇔"],["\\eta","η"],["\\eth","ð"],["\\d{}","̣"],["\\rho","ρ"],["\\dzh","џ"],["\\div","÷"],["\\phi","ϕ"],["\\Rsh","↱"],["\\vee","∨"],["\\b{}","ˍ"],["\\t{}","͡"],["\\int","∫"],["\\sim","∼"],["\\r{}","˚"],["\\Lsh","↰"],["\\yen","¥"],["\\ggg","⋙"],["\\mid","∣"],["\\sum","∑"],["\\Dz","Ѕ"],["\\Re","ℜ"],["\\oe","œ"],["\\DH","Ð"],["\\ll","≪"],["\\ng","ŋ"],["\\'G","Ѓ"],["\\wr","≀"],["\\wp","℘"],["\\=I","І"],["\\:)","☺"],["\\:(","☹"],["\\AE","Æ"],["\\AA","Å"],["\\ss","ß"],["\\dz","ѕ"],["\\ae","æ"],["\\aa","å"],["\\th","þ"],["\\to","→"],["\\Pi","Π"],["\\mp","∓"],["\\Im","ℑ"],["\\pm","±"],["\\pi","π"],["\\\"I","Ї"],["\\'C","Ћ"],["\\in","∈"],["\\'K","Ќ"],["\\'k","ќ"],["\\'c","ћ"],["\\'g","ѓ"],["\\ni","∋"],["\\ne","≠"],["\\TH","Þ"],["\\Xi","Ξ"],["\\nu","ν"],["\\NG","Ŋ"],["\\:G","㋡"],["\\xi","ξ"],["\\OE","Œ"],["\\gg","≫"],["\\DJ","Đ"],["\\=e","є"],["\\=E","Є"],["\\mu","μ"],["\\dj","đ"],["\\:"," "],["\\;"," "],["\\&","&"],["\\$","$"],["\\%","%"],["\\#","#"],["\\,"," "],["\\-","­"],["\\S","§"],["\\P","¶"],["\\O","Ø"],["\\L","Ł"],["\\}","}"],["\\o","ø"],["\\l","ł"],["\\h","ℎ"],["\\i","ℹ"],["-","−"]],"combiningmarks":[["\\doubleunderline","̳"],["\\strikethrough","̵"],["\\underline","̲"],["\\overline","̅"],["\\tilde","̃"],["\\grave","̀"],["\\acute","́"],["\\slash","̸"],["\\breve","̆"],["\\ddot","̈"],["\\dot","̇"],["\\bar","̅"],["\\vec","⃗"],["\\hat","̂"]],"subsuperscripts":[["_x","ₓ"],["_v","ᵥ"],["_u","ᵤ"],["_t","ₜ"],["_s","ₛ"],["_r","ᵣ"],["_p","ₚ"],["_o","ₒ"],["_n","ₙ"],["_m","ₘ"],["_l","ₗ"],["_k","ₖ"],["_j","ⱼ"],["_i","ᵢ"],["_h","ₕ"],["_e","ₑ"],["_a","ₐ"],["^∫","ᶴ"],["_>","˲"],["_=","₌"],["_<","˱"],["_9","₉"],["_8","₈"],["_7","₇"],["_6","₆"],["_5","₅"],["_4","₄"],["_3","₃"],["_2","₂"],["_1","₁"],["_0","₀"],["_-","₋"],["_−","₋"],["_+","₊"],["_)","₎"],["_(","₍"],["_ρ","ᵨ"],["_χ","ᵪ"],["_φ","ᵩ"],["_β","ᵦ"],["_γ","ᵧ"],["^φ","ᵠ"],["^χ","ᵡ"],["^δ","ᵟ"],["^γ","ᵞ"],["^β","ᵝ"],["^8","⁸"],["^9","⁹"],["^<","˂"],["^=","⁼"],["^>","˃"],["^0","⁰"],["^1","¹"],["^2","²"],["^3","³"],["^4","⁴"],["^5","⁵"],["^6","⁶"],["^7","⁷"],["^(","⁽"],["^)","⁾"],["^*","*"],["^+","⁺"],["^-","⁻"],["^−","⁻"],["^P","ᴾ"],["^R","ᴿ"],["^T","ᵀ"],["^U","ᵁ"],["^V","ᄑ"],["^W","ᵂ"],["^H","ᴴ"],["^I","ᴵ"],["^J","ᴶ"],["^K","ᴷ"],["^L","ᴸ"],["^M","ᴹ"],["^N","ᴺ"],["^O","ᴼ"],["^A","ᴬ"],["^B","ᴮ"],["^D","ᴰ"],["^E","ᴱ"],["^G","ᴳ"],["^x","ˣ"],["^y","ʸ"],["^z","ᶻ"],["^p","ᵖ"],["^r","ʳ"],["^s","ˢ"],["^t","ᵗ"],["^u","ᵘ"],["^v","ᵛ"],["^w","ʷ"],["^h","ʰ"],["^i","ⁱ"],["^j","ʲ"],["^k","ᵏ"],["^l","ˡ"],["^m","ᵐ"],["^n","ⁿ"],["^o","ᵒ"],["^a","ᵃ"],["^b","ᵇ"],["^c","ᶜ"],["^d","ᵈ"],["^e","ᵉ"],["^f","ᶠ"],["^g","ᵍ"]]}
@@ -1,12 +1,13 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'kramdown-rfc2629'
3
- s.version = '1.3.17'
3
+ s.version = '1.3.23'
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.}
7
7
  s.add_dependency('kramdown', '~> 1.17.0')
8
8
  s.add_dependency('certified', '~> 1.0')
9
- s.files = Dir['lib/**/*.rb'] + %w(README.md LICENSE kramdown-rfc2629.gemspec bin/kdrfc bin/kramdown-rfc2629 bin/doilit bin/kramdown-rfc-extract-markdown data/kramdown-rfc2629.erb data/encoding-fallbacks.txt)
9
+ s.add_dependency('json', '~> 2.0')
10
+ s.files = Dir['lib/**/*.rb'] + %w(README.md LICENSE kramdown-rfc2629.gemspec bin/kdrfc bin/kramdown-rfc2629 bin/doilit bin/kramdown-rfc-extract-markdown data/kramdown-rfc2629.erb data/encoding-fallbacks.txt data/math.json)
10
11
  s.require_path = 'lib'
11
12
  s.executables = ['kramdown-rfc2629', 'doilit', 'kramdown-rfc-extract-markdown', 'kdrfc']
12
13
  s.required_ruby_version = '>= 2.3.0'
@@ -19,6 +19,7 @@ Kramdown::Parser::Html::Constants::HTML_SPAN_ELEMENTS.concat my_span_elements
19
19
 
20
20
  require 'rexml/parsers/baseparser'
21
21
  require 'open3' # for math
22
+ require 'json' # for math
22
23
 
23
24
  class Object
24
25
  def deep_clone
@@ -38,7 +39,36 @@ module Kramdown
38
39
  @span_parsers.unshift(:iref)
39
40
  end
40
41
 
41
- XREF_START = /\{\{(?:(?:\{(.*?)\}(?:\{(.*?)\})?)|(.*?))((?:\}\})|\})/u
42
+ SECTIONS_RE = /Section(?:s (?:[\w.]+, )*[\w.]+,? and)? [\w.]+/
43
+
44
+ def handle_bares(s, attr, format, href)
45
+ sa = s.sub(/\A\S+\s/, '').split(/,? and /)
46
+ sa[0..0] = *sa[0].split(', ')
47
+ sz = sa.size
48
+ if sz != 1 # we have to redo xml2rfc's work here
49
+ @tree.children << Element.new(:text, "Sections ", {}) # XXX needs to split into Section/Appendix
50
+ sa.each_with_index do |sec, i|
51
+ attr1 = {"target" => href, "section" => sec, "sectionFormat" => "bare"}
52
+ @tree.children << Element.new(:xref, nil, attr1)
53
+ text = if i == 0 && sz == 2
54
+ " and "
55
+ elsif i == sz-1
56
+ " of "
57
+ elsif i == sz-2
58
+ ", and "
59
+ else
60
+ ", "
61
+ end
62
+ @tree.children << Element.new(:text, text, {})
63
+ end
64
+ # attr stays unchanged, no section added
65
+ else
66
+ attr['section'] = sa[-1]
67
+ attr['sectionFormat'] = format
68
+ end
69
+ end
70
+
71
+ XREF_START = /\{\{(?:(?:\{(.*?)\}(?:\{(.*?)\})?)|(\X*?))((?:\}\})|\})/u
42
72
 
43
73
  # Introduce new {{target}} syntax for empty xrefs, which would
44
74
  # otherwise be an ugly ![!](target) or ![ ](target)
@@ -56,8 +86,28 @@ module Kramdown
56
86
  el = Element.new(:contact, nil, attr)
57
87
  else
58
88
  href = @src[3]
89
+ attr = {}
90
+ if $options.v3
91
+ # match Section ... of ...; set section, sectionFormat
92
+ case href.gsub(/[\u00A0\s]+/, ' ') # may need nbsp and/or newlines
93
+ when /\A(#{SECTIONS_RE}) of (.*)\z/
94
+ href = $2
95
+ handle_bares($1, attr, "of", href)
96
+ when /\A(.*), (#{SECTIONS_RE})\z/
97
+ href = $1
98
+ handle_bares($2, attr, "comma", href)
99
+ when /\A(.*) \((#{SECTIONS_RE})\)\z/
100
+ href = $1
101
+ handle_bares($2, attr, "parens", href)
102
+ when /\A([\w.]+)<(.*)\z/
103
+ href = $2
104
+ attr['section'] = $1
105
+ attr['sectionFormat'] = 'bare'
106
+ end
107
+ end
59
108
  href = href.gsub(/\A[0-9]/) { "_#{$&}" } # can't start an IDREF with a number
60
- el = Element.new(:xref, nil, {'target' => href})
109
+ attr['target'] = href
110
+ el = Element.new(:xref, nil, attr)
61
111
  end
62
112
  @tree.children << el
63
113
  end
@@ -236,6 +286,14 @@ COLORS
236
286
  out
237
287
  end
238
288
 
289
+ def capture_croak(t, err)
290
+ if err != ''
291
+ err.lines do |l|
292
+ warn "*** [#{t}:] #{l.chomp}"
293
+ end
294
+ end
295
+ end
296
+
239
297
  def svg_tool_process(t, result)
240
298
  require 'tempfile'
241
299
  file = Tempfile.new("kramdown-rfc")
@@ -243,28 +301,32 @@ COLORS
243
301
  file.close
244
302
  case t
245
303
  when "goat"
246
- result1, _s = Open3.capture2("goat #{file.path}", stdin_data: result);
304
+ result1, err, _s = Open3.capture3("goat #{file.path}", stdin_data: result);
247
305
  when "ditaa" # XXX: This needs some form of option-setting
248
- result1, _s = Open3.capture2("ditaa #{file.path} --svg -o -", stdin_data: result);
306
+ result1, err, _s = Open3.capture3("ditaa #{file.path} --svg -o -", stdin_data: result);
249
307
  when "mscgen"
250
- result1, _s = Open3.capture2("mscgen -T svg -i #{file.path} -o -", stdin_data: result);
308
+ result1, err, _s = Open3.capture3("mscgen -T svg -i #{file.path} -o -", stdin_data: result);
251
309
  when "mermaid"
252
- result1, _s = Open3.capture2("mmdc -i #{file.path}", stdin_data: result); # -b transparent
310
+ result1, err, _s = Open3.capture3("mmdc -i #{file.path}", stdin_data: result); # -b transparent
253
311
  outpath = file.path + ".svg"
254
312
  result1 = File.read(outpath)
255
313
  File.unlink(outpath)
256
314
  when "plantuml", "plantuml-utxt"
257
315
  plantuml = "@startuml\n#{result}\n@enduml"
258
- result1, _s = Open3.capture2("plantuml -pipe -tsvg", stdin_data: plantuml);
259
- result, _s = Open3.capture2("plantuml -pipe -tutxt", stdin_data: plantuml) if t == "plantuml-utxt"
316
+ result1, err, _s = Open3.capture3("plantuml -pipe -tsvg", stdin_data: plantuml);
317
+ result, err1, _s = Open3.capture3("plantuml -pipe -tutxt", stdin_data: plantuml) if t == "plantuml-utxt"
318
+ err << err1
260
319
  when "math"
261
- result1, _s = Open3.capture2("tex2svg --font STIX #{Shellwords.escape(' ' << result)}");
262
- result, _s = Open3.capture2("asciitex -f #{file.path}")
320
+ result1, err, _s = Open3.capture3("tex2svg --font STIX --speech=false #{Shellwords.escape(' ' << result)}");
321
+ result, err1, _s = Open3.capture3("asciitex -f #{file.path}")
322
+ err << err1
263
323
  end
324
+ capture_croak(t, err)
264
325
  # warn ["goat:", result1.inspect]
265
326
  file.unlink
266
327
  result1 = svg_clean(result1) unless t == "goat"
267
- result1, _s = Open3.capture2("svgcheck -qa", stdin_data: result1);
328
+ result1, err, _s = Open3.capture3("svgcheck -qa", stdin_data: result1);
329
+ capture_croak("svgcheck", err)
268
330
  # warn ["svgcheck:", result1.inspect]
269
331
  [result, result1] # text, svg
270
332
  end
@@ -360,8 +422,15 @@ COLORS
360
422
  if options[:auto_ids] && !el.attr['anchor']
361
423
  el.attr['anchor'] = saner_generate_id(el.options[:raw_text])
362
424
  end
425
+ if $options.v3
426
+ if sl = el.attr.delete('slugifiedName') # could do general name- play
427
+ attrstring = html_attributes({'slugifiedName' => sl})
428
+ end
429
+ irefs = "<name#{attrstring}>#{inner(el, indent, opts)}</name>" #
430
+ else
363
431
  clean, irefs = clean_pcdata(inner_a(el, indent, opts))
364
432
  el.attr['title'] = clean
433
+ end
365
434
  "#{end_sections(el.options[:level], indent)}#{' '*indent}<section#{@sec_level += 1; el_html_attributes(el)}>#{irefs}\n"
366
435
  end
367
436
 
@@ -381,7 +450,21 @@ COLORS
381
450
  end
382
451
  end
383
452
  alias :convert_ol :convert_ul
384
- alias :convert_dl :convert_ul
453
+
454
+ def convert_dl(el, indent, opts)
455
+ if $options.v3
456
+ if hangindent = el.attr.delete('hangIndent')
457
+ el.attr['indent'] ||= hangindent # new attribute name wins
458
+ end
459
+ vspace = el.attr.delete('vspace')
460
+ if vspace && !el.attr['newline']
461
+ el.attr['newline'] = 'true'
462
+ end
463
+ "#{' '*indent}<dl#{el_html_attributes(el)}>\n#{inner(el, indent, opts.dup)}#{' '*indent}</dl>\n"
464
+ else
465
+ convert_ul(el, indent, opts)
466
+ end
467
+ end
385
468
 
386
469
  def convert_li(el, indent, opts)
387
470
  res_a = inner_a(el, indent, opts)
@@ -396,7 +479,16 @@ COLORS
396
479
  end
397
480
  "#{' '*indent}<t#{el_html_attributes(el)}>#{res}#{(res =~ /\n\Z/ ? ' '*indent : '')}</t>\n"
398
481
  end
482
+
399
483
  def convert_dd(el, indent, opts)
484
+ if $options.v3
485
+ out = ''
486
+ if !opts[:haddt]
487
+ out ="#{' '*indent}<dt/>\n" # you can't make this one up
488
+ end
489
+ opts[:haddt] = false
490
+ out << "#{' '*indent}<dd#{el_html_attributes(el)}>\n#{inner(el, indent, opts)}#{' '*indent}</dd>\n"
491
+ else
400
492
  output = ' '*indent
401
493
  if @in_dt == 1
402
494
  @in_dt = 0
@@ -410,15 +502,25 @@ COLORS
410
502
  # output << "\n" << res << ' '*indent
411
503
  # end
412
504
  output << "</t>\n"
505
+ end
413
506
  end
414
507
 
415
508
  def convert_dt(el, indent, opts) # SERIOUSLY BAD HACK:
509
+ if $options.v3
510
+ out = ''
511
+ if opts[:haddt]
512
+ out ="#{' '*indent}<dd><t/></dd>\n" # you can't make this one up
513
+ end
514
+ opts[:haddt] = true
515
+ out << "#{' '*indent}<dt#{el_html_attributes(el)}>\n#{inner(el, indent, opts)}#{' '*indent}</dt>\n"
516
+ else
416
517
  close = "#{' '*indent}</t>\n" * @in_dt
417
518
  @in_dt = 1
418
519
  vspace = opts[:vspace]
419
520
  vspaceel = "<vspace blankLines='#{vspace}'/>" if vspace
420
521
  ht = escape_html(inner(el, indent, opts), :attribute) # XXX this may leave gunk
421
522
  "#{close}#{' '*indent}<t#{el_html_attributes(el)} hangText=\"#{ht}\">#{vspaceel}\n"
523
+ end
422
524
  end
423
525
 
424
526
  HTML_TAGS_WITH_BODY=['div', 'script']
@@ -709,9 +811,14 @@ COLORS
709
811
  EMPH = { em: "emph", strong: "strong"}
710
812
 
711
813
  def convert_em(el, indent, opts)
814
+ if $options.v3
815
+ gi = el.type
816
+ "<#{gi}#{el_html_attributes(el)}>#{inner(el, indent, opts)}</#{gi}>"
817
+ else
712
818
  attrstring = el_html_attributes_with(el, {"style" => EMPH[el.type]})
713
819
  span, irefs = clean_pcdata(inner_a(el, indent, opts))
714
820
  "<spanx#{attrstring}>#{span}</spanx>#{irefs}"
821
+ end
715
822
  end
716
823
  alias :convert_strong :convert_em
717
824
 
@@ -740,6 +847,23 @@ COLORS
740
847
  entity_to_str(smart_quote_entity(el))
741
848
  end
742
849
 
850
+ MATH_LATEX_FILENAME = File.expand_path '../../data/math.json', __FILE__
851
+ MATH_LATEX = JSON.parse(File.read(MATH_LATEX_FILENAME, encoding: Encoding::UTF_8))
852
+ MATH_REPLACEMENTS = MATH_LATEX["replacements"]
853
+ MATH_COMBININGMARKS = MATH_LATEX["combiningmarks"]
854
+
855
+ def munge_latex(s)
856
+ MATH_REPLACEMENTS.each do |o, n|
857
+ s.gsub!(o, n)
858
+ end
859
+ MATH_COMBININGMARKS.each do |m, n|
860
+ re = /\\#{m[1..-1]}\{(\X)\}/
861
+ s.gsub!(re) { "#$1#{n}" }
862
+ end
863
+ s
864
+ end
865
+ # XXX: This is missing sup/sub support, which needs to be added
866
+
743
867
  def convert_math(el, indent, opts) # XXX: This is wrong
744
868
  el = el.deep_clone
745
869
  if el.options[:category] == :block
@@ -752,15 +876,24 @@ COLORS
752
876
  artwork_attr[md[1]] = v
753
877
  end
754
878
  end
755
- result, _s = Open3.capture2("tex2mail -noindent -ragged -by_par -linelength=69", stdin_data: el.value);
879
+ result, err, _s = Open3.capture3("tex2mail -noindent -ragged -by_par -linelength=69", stdin_data: el.value);
756
880
  # warn "*** tex2mail not in path?" unless s.success? -- doesn't have useful status
881
+ capture_croak("tex2mail", err)
757
882
  "#{' '*indent}<figure#{el_html_attributes(el)}><artwork#{html_attributes(artwork_attr)}><![CDATA[#{result}#{result =~ /\n\Z/ ? '' : "\n"}]]></artwork></figure>\n"
758
883
 
759
884
  else
760
- warn "*** no support for inline math in XML2RFCv2"
761
885
  type = 'spanx'
762
- attrstring = el_html_attributes_with(el, {"style" => 'verb'})
763
- "<#{type}#{attrstring}>#{escape_html(el.value, :text)}</#{type}>"
886
+ if $options.v3
887
+ type = 'contact'
888
+ result = munge_latex(el.value)
889
+ attrstring = el_html_attributes_with(el, {"fullname" => result.chomp, "asciiFullname" => ''})
890
+ else
891
+ warn "*** no support for inline math in XML2RFCv2"
892
+ type = 'spanx'
893
+ attrstring = el_html_attributes_with(el, {"style" => 'verb'})
894
+ content = escape_html(el.value, :text)
895
+ end
896
+ "<#{type}#{attrstring}>#{content}</#{type}>"
764
897
  end
765
898
  end
766
899
 
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.3.17
4
+ version: 1.3.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-19 00:00:00.000000000 Z
11
+ date: 2020-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
41
55
  description: |-
42
56
  An RFC7749 (XML2RFC) generating backend for Thomas Leitner's
43
57
  "kramdown" markdown parser. Mostly useful for RFC writers.
@@ -58,6 +72,7 @@ files:
58
72
  - bin/kramdown-rfc2629
59
73
  - data/encoding-fallbacks.txt
60
74
  - data/kramdown-rfc2629.erb
75
+ - data/math.json
61
76
  - kramdown-rfc2629.gemspec
62
77
  - lib/kramdown-rfc/gzip-clone.rb
63
78
  - lib/kramdown-rfc/parameterset.rb
@@ -82,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
97
  - !ruby/object:Gem::Version
83
98
  version: '0'
84
99
  requirements: []
85
- rubygems_version: 3.1.2
100
+ rubygems_version: 3.1.4
86
101
  signing_key:
87
102
  specification_version: 4
88
103
  summary: Kramdown extension for generating RFC 7749 XML.