metanorma-standoc 1.10.1 → 1.10.2

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
  SHA256:
3
- metadata.gz: f5a985aefd39dadc19549ad39c23e0849bac873ea5883e50762ca911c8bd3aad
4
- data.tar.gz: b7560f906a1e50fc4032f3261a44d1edcb2e691872b3e85d14a0363d7668b575
3
+ metadata.gz: ca8e0e987187b1a9c3e36246671b4c8566746c6178034c55e0cba34164f64bbf
4
+ data.tar.gz: af58564b53587bff140ecec89f1ca9d2e051859befbcbabd9842ed3e84fda039
5
5
  SHA512:
6
- metadata.gz: 437c04558d97c828a200ca21668a0e74e7e9fe5b5581ab759955f9ada241a0a87ccfddf114b7bd616430107e5869ce785c547715d627a08b87e35a30237b0516
7
- data.tar.gz: 11d70602d2bd7733e9daab869ec22e3bf58ff6397378b38734711d46cb8f6e04b25e5b5fbcd3b5cd1e36b8e58a1061c92a87502fab945ea8a8c573205e25b126
6
+ metadata.gz: e711720551cfcfe47d425fcd3172c5bc07eb727dc9f08e2f9fe02cfa4edd1f9bffe5587b9a4215f470951149cc36a970ca669e217226a52fa812c07fb70ee1c5
7
+ data.tar.gz: acef9c690a20986928c0c26508787ba362022ee9970f35d9e9c4fe47c55aebf3a0dafac1e3d2c684bbecf602d0a750583948921bd65e04e791d462f20707448c
@@ -121,7 +121,7 @@ module Asciidoctor
121
121
  end
122
122
 
123
123
  def normalize_ref_id(text)
124
- text.downcase.gsub(/[[:space:]]/, "-")
124
+ Metanorma::Utils::to_ncname(text.downcase.gsub(/[[:space:]]/, "-"))
125
125
  end
126
126
 
127
127
  def unique_text_id(text, prefix)
@@ -19,6 +19,6 @@ module Metanorma
19
19
  end
20
20
 
21
21
  module Standoc
22
- VERSION = "1.10.1".freeze
22
+ VERSION = "1.10.2".freeze
23
23
  end
24
24
  end
@@ -1935,7 +1935,7 @@ RSpec.describe Asciidoctor::Standoc do
1935
1935
  <dd>
1936
1936
  <p id='_'>Definition 7</p>
1937
1937
  </dd>
1938
- <dt id="symbol--n-">
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>
@@ -1997,7 +1997,7 @@ RSpec.describe Asciidoctor::Standoc do
1997
1997
  <dd>
1998
1998
  <p id='_'>Definition 5</p>
1999
1999
  </dd>
2000
- <dt id='symbol--xm-'><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 id='symbol--x1-'><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>
@@ -2031,7 +2031,7 @@ RSpec.describe Asciidoctor::Standoc do
2031
2031
  <dd>
2032
2032
  <p id='_'>Definition 2</p>
2033
2033
  </dd>
2034
- <dt id='symbol--&#945;-'>
2034
+ <dt id='symbol-_-&#945;-'>
2035
2035
  <stem type='MathML'>
2036
2036
  <math xmlns='http://www.w3.org/1998/Math/MathML'>
2037
2037
  <mi>α</mi>
@@ -663,6 +663,75 @@ RSpec.describe Asciidoctor::Standoc do
663
663
  .to be_equivalent_to xmlpp(output)
664
664
  end
665
665
 
666
+ it "processes the concept macros with disambiguation for math symbols" do
667
+ input = <<~INPUT
668
+ #{ASCIIDOC_BLANK_HDR}
669
+ [[clause1]]
670
+
671
+ == Symbols and Abbreviated Terms
672
+ stem:[|~ x ~|]:: A function that returns the smallest integer greater than or equal to stem:[x]; also known as the _ceiling_ function.
673
+ stem:[|__ x __|]:: A function that returns the largest integer less than or equal to stem:[x]; also known as the _floor_ function.
674
+ INPUT
675
+ output = <<~OUTPUT
676
+ #{BLANK_HDR}
677
+ <sections>
678
+ <definitions id='clause1' obligation='normative'>
679
+ <title>Symbols and abbreviated terms</title>
680
+ <dl id='_'>
681
+ <dt id='symbol-_-_x_-'>
682
+ <stem type='MathML'>
683
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
684
+ <mo>&#8970;</mo>
685
+ <mi>x</mi>
686
+ <mo>&#8971;</mo>
687
+ </math>
688
+ </stem>
689
+ </dt>
690
+ <dd>
691
+ <p id='_'>
692
+ A function that returns the largest integer less than or equal to
693
+ <stem type='MathML'>
694
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
695
+ <mi>x</mi>
696
+ </math>
697
+ </stem>
698
+ ; also known as the
699
+ <em>floor</em>
700
+ function.
701
+ </p>
702
+ </dd>
703
+ <dt id='symbol-_-_x_--1'>
704
+ <stem type='MathML'>
705
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
706
+ <mo>&#8968;</mo>
707
+ <mi>x</mi>
708
+ <mo>&#8969;</mo>
709
+ </math>
710
+ </stem>
711
+ </dt>
712
+ <dd>
713
+ <p id='_'>
714
+ A function that returns the smallest integer greater than or equal
715
+ to
716
+ <stem type='MathML'>
717
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
718
+ <mi>x</mi>
719
+ </math>
720
+ </stem>
721
+ ; also known as the
722
+ <em>ceiling</em>
723
+ function.
724
+ </p>
725
+ </dd>
726
+ </dl>
727
+ </definitions>
728
+ </sections>
729
+ </standard-document>
730
+ OUTPUT
731
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
732
+ .to be_equivalent_to xmlpp(output)
733
+ end
734
+
666
735
  it "processes the TODO custom admonition" do
667
736
  input = <<~INPUT
668
737
  #{ASCIIDOC_BLANK_HDR}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-standoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor