Skip to content

Commit

Permalink
preserve whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mkraetke committed Aug 28, 2018
1 parent eb2649f commit 349238b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions xsl/xml2tex.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@
<xso:template match="processing-instruction()" mode="clean"/>

<xso:template match="text()" mode="clean">
<xso:variable name="normalize-linebreaks" select="replace(., '\n\n\n+', '&#xa;&#xa;', 'm')" as="xs:string"/>
<xso:variable name="normalize-whitespace" select="replace($normalize-linebreaks, '[&#x20;&#x9;][&#x20;&#x9;]+', '&#x20;')" as="xs:string"/>
<xso:value-of select="$normalize-whitespace"/>
<xso:variable name="normalize-linebreaks" select="replace(., '\n\n\n+', '&#xa;&#xa;', 'm')" as="xs:string"/>
<xso:value-of select="$normalize-linebreaks"/>
</xso:template>

<!-- dissolve pis created by calstable-normalize -->
Expand Down

0 comments on commit 349238b

Please sign in to comment.