Skip to content

Commit

Permalink
fixup! Remove end-of-hi related .
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Feb 14, 2018
1 parent 6877f15 commit 1dddbd2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xslt/text-cleanup.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,17 @@
<xsl:value-of select="replace(., '\.\s*$', '')"/>
</xsl:template>

<xsl:template mode="pass2" match="stage//hi/text()[position()=last()]">
<xsl:value-of select="replace(., '\.$', '')"/>
<xsl:template mode="pass2" match="stage//hi/text()[position()=last()]" priority="1">
<xsl:variable name="prep"><xsl:next-match/></xsl:variable>
<xsl:value-of select="replace($prep, '\.$', '')"/>
</xsl:template>

<xsl:template mode="pass2" match="stage//text()[preceding-sibling::node()[1][self::hi]]" priority="1">
<xsl:variable name="prep"><xsl:next-match/></xsl:variable>
<xsl:value-of select="replace($prep, '^\.', '')"/>
</xsl:template>


<!-- The following fixes are eventually to be implemented in all source files: -->
<xsl:template match="stage/emph">
<xsl:element name="hi">
Expand Down

0 comments on commit 1dddbd2

Please sign in to comment.