metanorma-ribose 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: 6761d38048bebfb77cb9c87b081f032f2e5b1a2c7ead8ae40aed4d8ed5852035
4
- data.tar.gz: 80606d37f6866a7e4757ffa96e191797881233671f1a86f067264f64b619fe28
3
+ metadata.gz: 06f3ac2765345f6611750588e9950f4d77f552665142fc737ce5fe8be375001c
4
+ data.tar.gz: bb2b7c923e2945cbf3f0bdbb7a490d6042e753901301eb13559530b179a8287d
5
5
  SHA512:
6
- metadata.gz: e2c47150ee0f8b722a429aeab9b0ed17559ad1ca033699a8912d9a385e7ab683e91d5787d2de71fc24157c51db55b31ad55219ea64244804d148c0ea9a2a9f7f
7
- data.tar.gz: 442301d3d936b02edf99de150d594dbb84cbee319917765860f3342c3b228671dd774aee16bf081f7625514df358401d3cc45ad616de3572dfe087adb693cb90
6
+ metadata.gz: 745b5a44ef93701355dcddd77f59acdc3a256ca17b9d4d4c6b921cb43704ff19a949aa195197762ddb45aaa46361f5c8a8819b450f90910b8c41d616af50459a
7
+ data.tar.gz: 38c1ce002c351d4e6a31f8c88f56a5ebd5910620d6d5e75231c354ba901a9a46a07d2712b791933b7ebad492f805e4939f4ffef098a18066574d9640e26ac8b2
@@ -2666,8 +2666,27 @@
2666
2666
  <xsl:sort select="@displayorder" data-type="number"/>
2667
2667
  <xsl:apply-templates select="."/>
2668
2668
  </xsl:for-each>
2669
- </xsl:template><xsl:template match="text()">
2670
- <xsl:value-of select="."/>
2669
+ </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">
2670
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2671
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
2672
+ <xsl:call-template name="replace_fo_inline">
2673
+ <xsl:with-param name="text" select="$text"/>
2674
+ </xsl:call-template>
2675
+ </xsl:template><xsl:template name="replace_fo_inline">
2676
+ <xsl:param name="text"/>
2677
+ <xsl:choose>
2678
+ <xsl:when test="contains($text, $tag_open)">
2679
+ <xsl:value-of select="substring-before($text, $tag_open)"/>
2680
+ <xsl:text disable-output-escaping="yes">&lt;fo:inline keep-together.within-line="always"&gt;</xsl:text>
2681
+ <xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
2682
+ <xsl:value-of select="substring-before($text_after, $tag_close)"/>
2683
+ <xsl:text disable-output-escaping="yes">&lt;/fo:inline&gt;</xsl:text>
2684
+ <xsl:call-template name="replace_fo_inline">
2685
+ <xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
2686
+ </xsl:call-template>
2687
+ </xsl:when>
2688
+ <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
2689
+ </xsl:choose>
2671
2690
  </xsl:template><xsl:template match="*[local-name()='br']">
2672
2691
  <xsl:value-of select="$linebreak"/>
2673
2692
  </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
@@ -6254,7 +6273,7 @@
6254
6273
  <xsl:variable name="element">
6255
6274
 
6256
6275
  <xsl:choose>
6257
- <xsl:when test="$num = 1">inline</xsl:when>
6276
+ <xsl:when test="$num = 1 and not(contains($fo_element, 'block'))">inline</xsl:when>
6258
6277
  <xsl:otherwise>block</xsl:otherwise>
6259
6278
  </xsl:choose>
6260
6279
 
@@ -6346,7 +6365,8 @@
6346
6365
  <fo:inline><xsl:apply-templates/></fo:inline>
6347
6366
  </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
6348
6367
  <xsl:if test="normalize-space() != ''">
6349
- <xsl:value-of select="."/>
6368
+ <!-- <xsl:value-of select="."/> -->
6369
+ <xsl:call-template name="text"/>
6350
6370
  </xsl:if>
6351
6371
  </xsl:template><xsl:template match="*[local-name() = 'quote']">
6352
6372
  <fo:block-container margin-left="0mm">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
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-ribose
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