metanorma-standoc 1.10.0 → 1.10.1
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/asciidoctor/standoc/base.rb +0 -1
- data/lib/asciidoctor/standoc/blocks.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup.rb +1 -2
- data/lib/asciidoctor/standoc/cleanup_block.rb +0 -1
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +2 -2
- data/lib/asciidoctor/standoc/cleanup_footnotes.rb +0 -1
- data/lib/asciidoctor/standoc/cleanup_maths.rb +0 -1
- data/lib/asciidoctor/standoc/cleanup_section.rb +0 -1
- data/lib/asciidoctor/standoc/converter.rb +1 -0
- data/lib/asciidoctor/standoc/front.rb +0 -1
- data/lib/asciidoctor/standoc/front_contributor.rb +0 -1
- data/lib/asciidoctor/standoc/isodoc.rng +32 -7
- data/lib/asciidoctor/standoc/macros.rb +7 -5
- data/lib/asciidoctor/standoc/macros_plantuml.rb +3 -3
- data/lib/asciidoctor/standoc/macros_terms.rb +34 -7
- data/lib/asciidoctor/standoc/section.rb +19 -12
- data/lib/asciidoctor/standoc/term_lookup_cleanup.rb +58 -17
- data/lib/asciidoctor/standoc/utils.rb +0 -1
- data/lib/asciidoctor/standoc/validate.rb +4 -3
- data/lib/isodoc/html/html_titlepage.html +81 -0
- data/lib/isodoc/html/htmlstyle.css +983 -0
- data/lib/isodoc/html/htmlstyle.scss +714 -0
- data/lib/isodoc/html/scripts.html +71 -0
- data/lib/metanorma/standoc/processor.rb +16 -7
- data/lib/metanorma/standoc/version.rb +1 -1
- data/spec/asciidoctor/cleanup_spec.rb +12 -12
- data/spec/asciidoctor/macros_json2text_spec.rb +1 -1
- data/spec/asciidoctor/macros_spec.rb +228 -75
- data/spec/asciidoctor/validate_spec.rb +12 -2
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +50 -50
- data/spec/vcr_cassettes/isobib_get_123.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_123_1.yml +23 -23
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +34 -34
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +13 -13
- data/spec/vcr_cassettes/isobib_get_124.yml +12 -12
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +46 -46
- metadata +6 -2
@@ -0,0 +1,71 @@
|
|
1
|
+
<script>
|
2
|
+
$("#toc").on('click', 'li', function(e) {
|
3
|
+
$(this).parent().find('li.toc-active').removeClass('toc-active');
|
4
|
+
$(this).addClass('toc-active');
|
5
|
+
});
|
6
|
+
</script>
|
7
|
+
|
8
|
+
<script>
|
9
|
+
//TOC toggle animation
|
10
|
+
$('#toggle').on('click', function(){
|
11
|
+
if( $('nav').is(':visible') ) {
|
12
|
+
$('nav').animate({ 'left': '-353px' }, 'slow', function(){
|
13
|
+
$('nav').hide();
|
14
|
+
});
|
15
|
+
$('.container').animate({ 'padding-left': '31px' }, 'slow');
|
16
|
+
}
|
17
|
+
else {
|
18
|
+
$('nav').show();
|
19
|
+
$('nav').animate({ 'left': '0px' }, 'slow');
|
20
|
+
$('.container').animate({ 'padding-left': '360px' }, 'slow');
|
21
|
+
}
|
22
|
+
});
|
23
|
+
</script>
|
24
|
+
|
25
|
+
<script>
|
26
|
+
// Scroll to top button
|
27
|
+
window.onscroll = function() {scrollFunction()};
|
28
|
+
|
29
|
+
function scrollFunction() {
|
30
|
+
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
31
|
+
document.getElementById("myBtn").style.display = "block";
|
32
|
+
} else {
|
33
|
+
document.getElementById("myBtn").style.display = "none";
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
// When the user clicks on the button, scroll to the top of the document
|
38
|
+
function topFunction() {
|
39
|
+
document.body.scrollTop = 0;
|
40
|
+
document.documentElement.scrollTop = 0;
|
41
|
+
}
|
42
|
+
</script>
|
43
|
+
|
44
|
+
<script>
|
45
|
+
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
46
|
+
//
|
47
|
+
// AnchorJS - v4.2.2 - 2020-04-20
|
48
|
+
// https://www.bryanbraun.com/anchorjs/
|
49
|
+
// Copyright (c) 2020 Bryan Braun; Licensed MIT
|
50
|
+
//
|
51
|
+
// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat
|
52
|
+
!function(A,e){"use strict";"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():(A.AnchorJS=e(),A.anchors=new A.AnchorJS)}(this,function(){"use strict";return function(A){function f(A){A.icon=A.hasOwnProperty("icon")?A.icon:"",A.visible=A.hasOwnProperty("visible")?A.visible:"hover",A.placement=A.hasOwnProperty("placement")?A.placement:"right",A.ariaLabel=A.hasOwnProperty("ariaLabel")?A.ariaLabel:"Anchor",A.class=A.hasOwnProperty("class")?A.class:"",A.base=A.hasOwnProperty("base")?A.base:"",A.truncate=A.hasOwnProperty("truncate")?Math.floor(A.truncate):64,A.titleText=A.hasOwnProperty("titleText")?A.titleText:""}function p(A){var e;if("string"==typeof A||A instanceof String)e=[].slice.call(document.querySelectorAll(A));else{if(!(Array.isArray(A)||A instanceof NodeList))throw new Error("The selector provided to AnchorJS was invalid.");e=[].slice.call(A)}return e}this.options=A||{},this.elements=[],f(this.options),this.isTouchDevice=function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)},this.add=function(A){var e,t,i,n,o,s,a,r,c,h,l,u,d=[];if(f(this.options),"touch"===(l=this.options.visible)&&(l=this.isTouchDevice()?"always":"hover"),0===(e=p(A=A||"h2, h3, h4, h5, h6")).length)return this;for(!function(){if(null!==document.head.querySelector("style.anchorjs"))return;var A,e=document.createElement("style");e.className="anchorjs",e.appendChild(document.createTextNode("")),void 0===(A=document.head.querySelector('[rel="stylesheet"],style'))?document.head.appendChild(e):document.head.insertBefore(e,A);e.sheet.insertRule(".anchorjs-link{opacity:0;text-decoration:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}",e.sheet.cssRules.length),e.sheet.insertRule(":hover>.anchorjs-link,.anchorjs-link:focus{opacity:1}",e.sheet.cssRules.length),e.sheet.insertRule("[data-anchorjs-icon]::after{content:attr(data-anchorjs-icon)}",e.sheet.cssRules.length),e.sheet.insertRule('@font-face{font-family:anchorjs-icons;src:url(data:n/a;base64,AAEAAAALAIAAAwAwT1MvMg8yG2cAAAE4AAAAYGNtYXDp3gC3AAABpAAAAExnYXNwAAAAEAAAA9wAAAAIZ2x5ZlQCcfwAAAH4AAABCGhlYWQHFvHyAAAAvAAAADZoaGVhBnACFwAAAPQAAAAkaG10eASAADEAAAGYAAAADGxvY2EACACEAAAB8AAAAAhtYXhwAAYAVwAAARgAAAAgbmFtZQGOH9cAAAMAAAAAunBvc3QAAwAAAAADvAAAACAAAQAAAAEAAHzE2p9fDzz1AAkEAAAAAADRecUWAAAAANQA6R8AAAAAAoACwAAAAAgAAgAAAAAAAAABAAADwP/AAAACgAAA/9MCrQABAAAAAAAAAAAAAAAAAAAAAwABAAAAAwBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAMCQAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAg//0DwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAAIAAAACgAAxAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADAAAAAIAAgAAgAAACDpy//9//8AAAAg6cv//f///+EWNwADAAEAAAAAAAAAAAAAAAAACACEAAEAAAAAAAAAAAAAAAAxAAACAAQARAKAAsAAKwBUAAABIiYnJjQ3NzY2MzIWFxYUBwcGIicmNDc3NjQnJiYjIgYHBwYUFxYUBwYGIwciJicmNDc3NjIXFhQHBwYUFxYWMzI2Nzc2NCcmNDc2MhcWFAcHBgYjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAAADACWAAEAAAAAAAEACAAAAAEAAAAAAAIAAwAIAAEAAAAAAAMACAAAAAEAAAAAAAQACAAAAAEAAAAAAAUAAQALAAEAAAAAAAYACAAAAAMAAQQJAAEAEAAMAAMAAQQJAAIABgAcAAMAAQQJAAMAEAAMAAMAAQQJAAQAEAAMAAMAAQQJAAUAAgAiAAMAAQQJAAYAEAAMYW5jaG9yanM0MDBAAGEAbgBjAGgAbwByAGoAcwA0ADAAMABAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAP) format("truetype")}',e.sheet.cssRules.length)}(),t=document.querySelectorAll("[id]"),i=[].map.call(t,function(A){return A.id}),o=0;o<e.length;o++)if(this.hasAnchorJSLink(e[o]))d.push(o);else{if(e[o].hasAttribute("id"))n=e[o].getAttribute("id");else if(e[o].hasAttribute("data-anchor-id"))n=e[o].getAttribute("data-anchor-id");else{for(c=r=this.urlify(e[o].textContent),a=0;void 0!==s&&(c=r+"-"+a),a+=1,-1!==(s=i.indexOf(c)););s=void 0,i.push(c),e[o].setAttribute("id",c),n=c}(h=document.createElement("a")).className="anchorjs-link "+this.options.class,h.setAttribute("aria-label",this.options.ariaLabel),h.setAttribute("data-anchorjs-icon",this.options.icon),this.options.titleText&&(h.title=this.options.titleText),u=document.querySelector("base")?window.location.pathname+window.location.search:"",u=this.options.base||u,h.href=u+"#"+n,"always"===l&&(h.style.opacity="1"),""===this.options.icon&&(h.style.font="1em/1 anchorjs-icons","left"===this.options.placement&&(h.style.lineHeight="inherit")),"left"===this.options.placement?(h.style.position="absolute",h.style.marginLeft="-1em",h.style.paddingRight="0.5em",e[o].insertBefore(h,e[o].firstChild)):(h.style.paddingLeft="0.375em",e[o].appendChild(h))}for(o=0;o<d.length;o++)e.splice(d[o]-o,1);return this.elements=this.elements.concat(e),this},this.remove=function(A){for(var e,t,i=p(A),n=0;n<i.length;n++)(t=i[n].querySelector(".anchorjs-link"))&&(-1!==(e=this.elements.indexOf(i[n]))&&this.elements.splice(e,1),i[n].removeChild(t));return this},this.removeAll=function(){this.remove(this.elements)},this.urlify=function(A){return this.options.truncate||f(this.options),A.trim().replace(/\'/gi,"").replace(/[& +$,:;=?@"#{}|^~[`%!'<>\]\.\/\(\)\*\\\n\t\b\v]/g,"-").replace(/-{2,}/g,"-").substring(0,this.options.truncate).replace(/^-+|-+$/gm,"").toLowerCase()},this.hasAnchorJSLink=function(A){var e=A.firstChild&&-1<(" "+A.firstChild.className+" ").indexOf(" anchorjs-link "),t=A.lastChild&&-1<(" "+A.lastChild.className+" ").indexOf(" anchorjs-link ");return e||t||!1}}});
|
53
|
+
// @license-end
|
54
|
+
</script>
|
55
|
+
<script>
|
56
|
+
/*
|
57
|
+
$(document).ready(function() {
|
58
|
+
$('[id^=toc]').each(function ()
|
59
|
+
{
|
60
|
+
var currentToc = $(this);
|
61
|
+
var url = window.location.href;
|
62
|
+
currentToc.wrap("<a href='" + url + "#" + currentToc.attr("id") + "' </a>");
|
63
|
+
});
|
64
|
+
});
|
65
|
+
*/
|
66
|
+
anchors.options = {
|
67
|
+
placement: 'left'
|
68
|
+
};
|
69
|
+
anchors.add('h1, h2, h3, h4');
|
70
|
+
</script>
|
71
|
+
|
@@ -3,8 +3,7 @@ require "metanorma/processor"
|
|
3
3
|
module Metanorma
|
4
4
|
module Standoc
|
5
5
|
class Processor < Metanorma::Processor
|
6
|
-
|
7
|
-
def initialize
|
6
|
+
def initialize # rubocop:disable Lint/MissingSuper
|
8
7
|
@short = :standoc
|
9
8
|
@input_format = :asciidoc
|
10
9
|
@asciidoctor_backend = :standoc
|
@@ -13,7 +12,7 @@ module Metanorma
|
|
13
12
|
def output_formats
|
14
13
|
super.merge(
|
15
14
|
html: "html",
|
16
|
-
doc: "doc"
|
15
|
+
doc: "doc",
|
17
16
|
)
|
18
17
|
end
|
19
18
|
|
@@ -21,14 +20,24 @@ module Metanorma
|
|
21
20
|
"Metanorma::Standoc #{Metanorma::Standoc::VERSION}/IsoDoc #{IsoDoc::VERSION}"
|
22
21
|
end
|
23
22
|
|
24
|
-
def
|
23
|
+
def html_path(file)
|
24
|
+
File.join(File.dirname(__FILE__), "..", "..", "isodoc", "html", file)
|
25
|
+
end
|
26
|
+
|
27
|
+
def output(isodoc_node, inname, outname, format, options = {})
|
25
28
|
case format
|
26
29
|
when :html
|
27
|
-
|
30
|
+
options = options
|
31
|
+
.merge(htmlstylesheet: html_path("htmlstyle.scss"),
|
32
|
+
htmlcoverpage: html_path("html_titlepage.html"))
|
33
|
+
IsoDoc::HtmlConvert.new(options)
|
34
|
+
.convert(inname, isodoc_node, nil, outname)
|
28
35
|
when :doc
|
29
|
-
IsoDoc::WordConvert.new(options)
|
36
|
+
IsoDoc::WordConvert.new(options)
|
37
|
+
.convert(inname, isodoc_node, nil, outname)
|
30
38
|
when :presentation
|
31
|
-
IsoDoc::PresentationXMLConvert.new(options)
|
39
|
+
IsoDoc::PresentationXMLConvert.new(options)
|
40
|
+
.convert(inname, isodoc_node, nil, outname)
|
32
41
|
else
|
33
42
|
super
|
34
43
|
end
|
@@ -1931,11 +1931,11 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1931
1931
|
<definitions id='L' obligation="normative">
|
1932
1932
|
<title>Symbols and abbreviated terms</title>
|
1933
1933
|
<dl id='_'>
|
1934
|
-
<dt>m</dt>
|
1934
|
+
<dt id="symbol-m">m</dt>
|
1935
1935
|
<dd>
|
1936
1936
|
<p id='_'>Definition 7</p>
|
1937
1937
|
</dd>
|
1938
|
-
<dt>
|
1938
|
+
<dt id="symbol--n-">
|
1939
1939
|
<stem type='MathML'>
|
1940
1940
|
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1941
1941
|
<mi>n</mi>
|
@@ -1945,23 +1945,23 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1945
1945
|
<dd>
|
1946
1946
|
<p id='_'>Definition 6</p>
|
1947
1947
|
</dd>
|
1948
|
-
<dt>x</dt>
|
1948
|
+
<dt id="symbol-x">x</dt>
|
1949
1949
|
<dd>
|
1950
1950
|
<p id='_'>Definition 5</p>
|
1951
1951
|
</dd>
|
1952
|
-
<dt>x_m_</dt>
|
1952
|
+
<dt id='symbol-x_m_'>x_m_</dt>
|
1953
1953
|
<dd>
|
1954
1954
|
<p id='_'>Definition 4</p>
|
1955
1955
|
</dd>
|
1956
|
-
<dt>x_1_</dt>
|
1956
|
+
<dt id='symbol-x_1_'>x_1_</dt>
|
1957
1957
|
<dd>
|
1958
1958
|
<p id='_'>Definition 3</p>
|
1959
1959
|
</dd>
|
1960
|
-
<dt>Xa</dt>
|
1960
|
+
<dt id='symbol-xa'>Xa</dt>
|
1961
1961
|
<dd>
|
1962
1962
|
<p id='_'>Definition 2</p>
|
1963
1963
|
</dd>
|
1964
|
-
<dt>α</dt>
|
1964
|
+
<dt id='symbol-α'>α</dt>
|
1965
1965
|
<dd>
|
1966
1966
|
<p id='_'>Definition 1</p>
|
1967
1967
|
</dd>
|
@@ -1993,11 +1993,11 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1993
1993
|
<definitions id='L' obligation="normative">
|
1994
1994
|
<title>Symbols and abbreviated terms</title>
|
1995
1995
|
<dl id='_'>
|
1996
|
-
<dt>x</dt>
|
1996
|
+
<dt id='symbol-x'>x</dt>
|
1997
1997
|
<dd>
|
1998
1998
|
<p id='_'>Definition 5</p>
|
1999
1999
|
</dd>
|
2000
|
-
<dt><stem type='MathML'>
|
2000
|
+
<dt id='symbol--xm-'><stem type='MathML'>
|
2001
2001
|
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2002
2002
|
<msub>
|
2003
2003
|
<mrow>
|
@@ -2012,7 +2012,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
2012
2012
|
<dd>
|
2013
2013
|
<p id='_'>Definition 4</p>
|
2014
2014
|
</dd>
|
2015
|
-
<dt><stem type='MathML'>
|
2015
|
+
<dt id='symbol--x1-'><stem type='MathML'>
|
2016
2016
|
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2017
2017
|
<msub>
|
2018
2018
|
<mrow>
|
@@ -2027,11 +2027,11 @@ RSpec.describe Asciidoctor::Standoc do
|
|
2027
2027
|
<dd>
|
2028
2028
|
<p id='_'>Definition 3</p>
|
2029
2029
|
</dd>
|
2030
|
-
<dt>xa</dt>
|
2030
|
+
<dt id='symbol-xa'>xa</dt>
|
2031
2031
|
<dd>
|
2032
2032
|
<p id='_'>Definition 2</p>
|
2033
2033
|
</dd>
|
2034
|
-
<dt>
|
2034
|
+
<dt id='symbol--α-'>
|
2035
2035
|
<stem type='MathML'>
|
2036
2036
|
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2037
2037
|
<mi>α</mi>
|
@@ -174,6 +174,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
174
174
|
{{blah,word}}
|
175
175
|
term:[blah,word]
|
176
176
|
{{blah,term,word}}
|
177
|
+
{{blah,term,word,xref}}
|
178
|
+
{{blah,term,word,xref,option="noital,noref"}}
|
177
179
|
|
178
180
|
[[clause1]]
|
179
181
|
== Clause
|
@@ -271,6 +273,26 @@ RSpec.describe Asciidoctor::Standoc do
|
|
271
273
|
<tt>blah</tt>
|
272
274
|
</strong>
|
273
275
|
</concept>
|
276
|
+
<concept>
|
277
|
+
<strong>
|
278
|
+
term
|
279
|
+
<tt>blah</tt>
|
280
|
+
, display
|
281
|
+
<tt>term</tt>
|
282
|
+
not resolved via ID
|
283
|
+
<tt>blah</tt>
|
284
|
+
</strong>
|
285
|
+
</concept>
|
286
|
+
<concept ital='false' ref='false'>
|
287
|
+
<strong>
|
288
|
+
term
|
289
|
+
<tt>blah</tt>
|
290
|
+
, display
|
291
|
+
<tt>term</tt>
|
292
|
+
not resolved via ID
|
293
|
+
<tt>blah</tt>
|
294
|
+
</strong>
|
295
|
+
</concept>
|
274
296
|
</p>
|
275
297
|
</foreword>
|
276
298
|
</preface>
|
@@ -286,6 +308,137 @@ RSpec.describe Asciidoctor::Standoc do
|
|
286
308
|
.to be_equivalent_to xmlpp(output)
|
287
309
|
end
|
288
310
|
|
311
|
+
it "processes the Asciidoctor::Standoc concept macros for acronyms" do
|
312
|
+
input = <<~INPUT
|
313
|
+
#{ASCIIDOC_BLANK_HDR}
|
314
|
+
{{Clause1}}
|
315
|
+
{{Clause1,Clause 1}}
|
316
|
+
{{Clause 2}}
|
317
|
+
{{Clause 2,Clause 1}}
|
318
|
+
{{<<Clause2>>,Clause 2}}
|
319
|
+
symbol:[Clause1]
|
320
|
+
symbol:[Clause1,word]
|
321
|
+
symbol:[Clause 2]
|
322
|
+
symbol:[Clause 2,word]
|
323
|
+
{{<<Clause2>>,word}}
|
324
|
+
{{<<Clause2>>,word,term}}
|
325
|
+
{{<<Clause2>>,word,term,xref}}
|
326
|
+
{{<<Clause2>>,word,term,xref,option="noital,noref"}}
|
327
|
+
{{<<Clause2>>,word,term,xref,option="ital,ref"}}
|
328
|
+
|
329
|
+
== Terms and definitions
|
330
|
+
=== Clause1
|
331
|
+
== Symbols and Abbreviated Terms
|
332
|
+
Clause1:: A
|
333
|
+
[[Clause2]]Clause 2:: C
|
334
|
+
INPUT
|
335
|
+
output = <<~OUTPUT
|
336
|
+
#{BLANK_HDR}
|
337
|
+
<preface>
|
338
|
+
<foreword id='_' obligation='informative'>
|
339
|
+
<title>Foreword</title>
|
340
|
+
<p id='_'>
|
341
|
+
<concept>
|
342
|
+
<refterm>Clause1</refterm>
|
343
|
+
<renderterm>Clause1</renderterm>
|
344
|
+
<xref target='term-clause1'/>
|
345
|
+
</concept>
|
346
|
+
<concept>
|
347
|
+
<refterm>Clause1</refterm>
|
348
|
+
<renderterm>Clause 1</renderterm>
|
349
|
+
<xref target='term-clause1'/>
|
350
|
+
</concept>
|
351
|
+
<concept>
|
352
|
+
<refterm>Clause 2</refterm>
|
353
|
+
<renderterm>Clause 2</renderterm>
|
354
|
+
<xref target='Clause2'/>
|
355
|
+
</concept>
|
356
|
+
<concept>
|
357
|
+
<refterm>Clause 2</refterm>
|
358
|
+
<renderterm>Clause 1</renderterm>
|
359
|
+
<xref target='Clause2'/>
|
360
|
+
</concept>
|
361
|
+
<concept>
|
362
|
+
<refterm>Clause 2</refterm>
|
363
|
+
<renderterm>Clause 2</renderterm>
|
364
|
+
<xref target='Clause2'/>
|
365
|
+
</concept>
|
366
|
+
<concept>
|
367
|
+
<refterm>Clause1</refterm>
|
368
|
+
<renderterm>Clause1</renderterm>
|
369
|
+
<xref target='symbol-clause1'/>
|
370
|
+
</concept>
|
371
|
+
<concept>
|
372
|
+
<refterm>Clause1</refterm>
|
373
|
+
<renderterm>word</renderterm>
|
374
|
+
<xref target='symbol-clause1'/>
|
375
|
+
</concept>
|
376
|
+
<concept>
|
377
|
+
<refterm>Clause 2</refterm>
|
378
|
+
<renderterm>Clause 2</renderterm>
|
379
|
+
<xref target='Clause2'/>
|
380
|
+
</concept>
|
381
|
+
<concept>
|
382
|
+
<refterm>Clause 2</refterm>
|
383
|
+
<renderterm>word</renderterm>
|
384
|
+
<xref target='Clause2'/>
|
385
|
+
</concept>
|
386
|
+
<concept>
|
387
|
+
<refterm>word</refterm>
|
388
|
+
<renderterm>word</renderterm>
|
389
|
+
<xref target='Clause2'/>
|
390
|
+
</concept>
|
391
|
+
<concept>
|
392
|
+
<refterm>word</refterm>
|
393
|
+
<renderterm>term</renderterm>
|
394
|
+
<xref target='Clause2'/>
|
395
|
+
</concept>
|
396
|
+
<concept>
|
397
|
+
<refterm>word</refterm>
|
398
|
+
<renderterm>term</renderterm>
|
399
|
+
<xref target='Clause2'>xref</xref>
|
400
|
+
</concept>
|
401
|
+
<concept ital='false' ref='false'>
|
402
|
+
<refterm>word</refterm>
|
403
|
+
<renderterm>term</renderterm>
|
404
|
+
<xref target='Clause2'>xref</xref>
|
405
|
+
</concept>
|
406
|
+
<concept ital='true' ref='true'>
|
407
|
+
<refterm>word</refterm>
|
408
|
+
<renderterm>term</renderterm>
|
409
|
+
<xref target='Clause2'>xref</xref>
|
410
|
+
</concept>
|
411
|
+
</p>
|
412
|
+
</foreword>
|
413
|
+
</preface>
|
414
|
+
<sections>
|
415
|
+
<terms id='_' obligation='normative'>
|
416
|
+
<title>Terms and definitions</title>
|
417
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
418
|
+
<term id='term-clause1'>
|
419
|
+
<preferred>Clause1</preferred>
|
420
|
+
</term>
|
421
|
+
</terms>
|
422
|
+
<definitions id='_' obligation='normative'>
|
423
|
+
<title>Symbols and abbreviated terms</title>
|
424
|
+
<dl id='_'>
|
425
|
+
<dt id="symbol-clause1">Clause1</dt>
|
426
|
+
<dd>
|
427
|
+
<p id='_'>A</p>
|
428
|
+
</dd>
|
429
|
+
<dt id='Clause2'>Clause 2</dt>
|
430
|
+
<dd>
|
431
|
+
<p id='_'>C</p>
|
432
|
+
</dd>
|
433
|
+
</dl>
|
434
|
+
</definitions>
|
435
|
+
</sections>
|
436
|
+
</standard-document>
|
437
|
+
OUTPUT
|
438
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
439
|
+
.to be_equivalent_to xmlpp(output)
|
440
|
+
end
|
441
|
+
|
289
442
|
it "processes the concept macros with xrefs" do
|
290
443
|
input = <<~INPUT
|
291
444
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -813,7 +966,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
813
966
|
input = <<~INPUT
|
814
967
|
#{ASCIIDOC_BLANK_HDR}
|
815
968
|
|
816
|
-
[form,id=N0,name=N1,action="/action_page.php"]
|
969
|
+
[form,id=N0,name=N1,action="/action_page.php",class="checkboxes"]
|
817
970
|
--
|
818
971
|
label:fname[First name:] +
|
819
972
|
input:text[id=fname,name=fname] +
|
@@ -851,7 +1004,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
851
1004
|
output = <<~OUTPUT
|
852
1005
|
#{BLANK_HDR}
|
853
1006
|
<sections>
|
854
|
-
<form id='_' name='N1' action='/action_page.php'>
|
1007
|
+
<form id='_' name='N1' action='/action_page.php' class="checkboxes">
|
855
1008
|
<p id='_'>
|
856
1009
|
<label for='fname'>First name:</label>
|
857
1010
|
<br/>
|
@@ -1139,79 +1292,79 @@ RSpec.describe Asciidoctor::Standoc do
|
|
1139
1292
|
end
|
1140
1293
|
let(:output) do
|
1141
1294
|
<<~XML
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1295
|
+
#{BLANK_HDR}
|
1296
|
+
<sections>
|
1297
|
+
<terms id='_' obligation='normative'>
|
1298
|
+
<title>Terms and definitions</title>
|
1299
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
1300
|
+
<term id='term-name-identity'>
|
1301
|
+
<preferred>name identity</preferred>
|
1302
|
+
</term>
|
1303
|
+
<term id='name-check'>
|
1304
|
+
<preferred>name check</preferred>
|
1305
|
+
<definition>
|
1306
|
+
<p id='_'>paragraph</p>
|
1307
|
+
<p id='_'>
|
1308
|
+
<concept>
|
1309
|
+
<refterm>name check</refterm>
|
1310
|
+
<renderterm>name check</renderterm>
|
1311
|
+
<xref target='name-check'/>
|
1312
|
+
</concept>
|
1313
|
+
is a term
|
1314
|
+
</p>
|
1315
|
+
<p id='_'>
|
1316
|
+
<concept>
|
1317
|
+
<refterm>name identity</refterm>
|
1318
|
+
<renderterm>name identity</renderterm>
|
1319
|
+
<xref target='term-name-identity'/>
|
1320
|
+
</concept>
|
1321
|
+
is a term
|
1322
|
+
</p>
|
1323
|
+
<p id='_'>
|
1324
|
+
Moreover,
|
1325
|
+
<concept>
|
1326
|
+
<strong>
|
1327
|
+
term
|
1328
|
+
<tt>missing</tt>
|
1329
|
+
not resolved via ID
|
1330
|
+
<tt>missing</tt>
|
1331
|
+
</strong>
|
1332
|
+
</concept>
|
1333
|
+
is a term
|
1334
|
+
</p>
|
1335
|
+
<p id='_'>
|
1336
|
+
<concept>
|
1337
|
+
<refterm>name check</refterm>
|
1338
|
+
<renderterm>name check</renderterm>
|
1339
|
+
<xref target='name-check'/>
|
1340
|
+
</concept>
|
1341
|
+
is a term
|
1342
|
+
</p>
|
1343
|
+
<p id='_'>
|
1344
|
+
<concept>
|
1345
|
+
<refterm>name identity</refterm>
|
1346
|
+
<renderterm>name identity</renderterm>
|
1347
|
+
<xref target='term-name-identity'/>
|
1348
|
+
</concept>
|
1349
|
+
is a term
|
1350
|
+
</p>
|
1351
|
+
<p id='_'>
|
1352
|
+
Moreover,
|
1353
|
+
<concept>
|
1354
|
+
<strong>
|
1355
|
+
term
|
1356
|
+
<tt>missing</tt>
|
1357
|
+
not resolved via ID
|
1358
|
+
<tt>missing</tt>
|
1359
|
+
</strong>
|
1360
|
+
</concept>
|
1361
|
+
is a term
|
1362
|
+
</p>
|
1363
|
+
</definition>
|
1364
|
+
</term>
|
1365
|
+
</terms>
|
1366
|
+
</sections>
|
1367
|
+
</standard-document>
|
1215
1368
|
XML
|
1216
1369
|
end
|
1217
1370
|
|