Skip to content

Commit 3f7a576

Browse files
committed
2 parents c7ecd89 + 53dc109 commit 3f7a576

File tree

5 files changed

+153
-143
lines changed

5 files changed

+153
-143
lines changed

lib/isodoc/jis/jis.international-standard.xsl

+11-2
Original file line numberDiff line numberDiff line change
@@ -5835,8 +5835,17 @@
58355835
<xsl:variable name="styles_">
58365836
<xsl:for-each select="xalan:nodeset($styles__)/item">
58375837
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5838-
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5839-
<xsl:if test="$key = 'font-family' or $key = 'color'">
5838+
<xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
5839+
<xsl:variable name="value">
5840+
<xsl:choose>
5841+
<!-- if font-size is digits only -->
5842+
<xsl:when test="$key = 'font-size' and translate($value_, '0123456789', '') = ''"><xsl:value-of select="$value_"/>pt</xsl:when>
5843+
<xsl:otherwise>
5844+
<xsl:value-of select="$value_"/>
5845+
</xsl:otherwise>
5846+
</xsl:choose>
5847+
</xsl:variable>
5848+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
58405849
<style name="{$key}"><xsl:value-of select="$value"/></style>
58415850
</xsl:if>
58425851
</xsl:for-each>

lib/isodoc/jis/xref.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ def commentary_names(clause)
7878

7979
def commentary_names1(clause, root, num, level)
8080
commentary_name_anchors(clause, num, root, level)
81-
clause.xpath(ns(SUBCLAUSES)).each_with_object(Counter.new) do |c, i|
82-
commentary_names1(c, root, "#{num}.#{i.increment(c).print}",
81+
clause.xpath(ns(SUBCLAUSES))
82+
.each_with_object(Counter.new(0, prefix: "#{num}.")) do |c, i|
83+
commentary_names1(c, root, i.increment(c).print,
8384
level + 1)
8485
end
8586
end

spec/vcr_cassettes/isobib_123_dated.yml

+44-44
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/vcr_cassettes/isobib_123_mix_dated.yml

+54-54
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/vcr_cassettes/isobib_123_undated.yml

+41-41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)