Skip to content

Commit

Permalink
Merge pull request qt4cg#721 from ndw/fix-pre
Browse files Browse the repository at this point in the history
Attempt to fix the problem with PRE elements in autodiffs
  • Loading branch information
ndw authored Sep 26, 2023
2 parents 1b6d981 + 0b2e2fa commit f61b05c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/xhtml5.xsl
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="#all"
version="3.0">

<xsl:output method="xhtml" html-version="5" encoding="utf-8" indent="no"/>

<xsl:mode on-no-match="shallow-copy"/>

<xsl:template match="html:pre">
<pre>
<xsl:attribute name="xml:space" select="'preserve'"/>
<xsl:apply-templates select="@*,node()"/>
</pre>
</xsl:template>

</xsl:stylesheet>

0 comments on commit f61b05c

Please sign in to comment.