metanorma-cc 2.0.6 → 2.0.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
  SHA256:
3
- metadata.gz: aa2c9dce7ea4be7d9d9e0ecb41409259b969b3e8aadac3a4c7ce4c24b3b28c56
4
- data.tar.gz: be0b9e664feb6820742fd5a87b78accc36011f196ede0d5cb8f5b3d683d0f837
3
+ metadata.gz: e03855ceedb587dd377335bd4d13945ac4bcbcf8fef6676d8e4cd91ce20a2d04
4
+ data.tar.gz: c64f52e63bed46a65c852e9dd21b4ddd38e8a828529d645645f1b53c7cefb92b
5
5
  SHA512:
6
- metadata.gz: 1ae65d5c95a76259cf80ae730aae3691664c915dc03a7d3245993c806d39f2c01035d8b944901786b16006e3f7211ec85dcf65efc583d1a2be8848d587c3e673
7
- data.tar.gz: 2a020aee734ba96c89a07c9c884341316ff4bb8304d4193cabb60c2fb228efeec284456b8b8b1f1712cea3ef2456e0743dee4ac9dd7cf93895d25fef10974f5e
6
+ metadata.gz: cbfabc84c6c9db02d89a591d12cf7d01d95f90c5037fa5e363a0bc24d19ae81e2e6025b60975519f673a57c00b67c7638d0c4a8056e747d61b0210c9f332fd0c
7
+ data.tar.gz: 1fb644c1b338180a6515181c55f53c4186fd99564d7378e833bdd1812566930e9248aa3cc446b5eb0c19c75365e59733d3af543b2f63f9a682da478e22e7aa4b
@@ -1915,8 +1915,27 @@
1915
1915
  <xsl:sort select="@displayorder" data-type="number"/>
1916
1916
  <xsl:apply-templates select="."/>
1917
1917
  </xsl:for-each>
1918
- </xsl:template><xsl:template match="text()">
1919
- <xsl:value-of select="."/>
1918
+ </xsl:template><xsl:variable name="tag_open">###fo:inline###</xsl:variable><xsl:variable name="tag_close">###/fo:inline###</xsl:variable><xsl:template match="text()" name="text">
1919
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
1920
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
1921
+ <xsl:call-template name="replace_fo_inline">
1922
+ <xsl:with-param name="text" select="$text"/>
1923
+ </xsl:call-template>
1924
+ </xsl:template><xsl:template name="replace_fo_inline">
1925
+ <xsl:param name="text"/>
1926
+ <xsl:choose>
1927
+ <xsl:when test="contains($text, $tag_open)">
1928
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
1929
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
1930
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
1931
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
1932
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
1933
+ <xsl:call-template name="replace_fo_inline">
1934
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
1935
+ </xsl:call-template>
1936
+ </xsl:when>
1937
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
1938
+ </xsl:choose>
1920
1939
  </xsl:template><xsl:template match="*[local-name()='br']">
1921
1940
  <xsl:value-of select="$linebreak"/>
1922
1941
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -5537,7 +5556,8 @@
5537
5556
  <fo:inline><xsl:apply-templates/></fo:inline>
5538
5557
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
5539
5558
  <xsl:if test="normalize-space() != ''">
5540
- <xsl:value-of select="."/>
5559
+ <!-- <xsl:value-of select="."/> -->
5560
+ <xsl:call-template name="text"/>
5541
5561
  </xsl:if>
5542
5562
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
5543
5563
  <fo:block-container margin-left="0mm">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
3
- VERSION = "2.0.6".freeze
3
+ VERSION = "2.0.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-21 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic