allow <pre> HTML elements in Luadoc via Lua.xsd

MDN's web docs describe the "HTML <pre> elements represents preformatted
text which is to be presented exactly as written in the HTML file."

It's handy for formatting multiline code examples in
LuaDocumentation.xml.
This commit is contained in:
quietly-turning
2020-06-25 03:58:57 -04:00
parent 89229ed915
commit c57279f6b8
2 changed files with 14 additions and 5 deletions
+1
View File
@@ -89,6 +89,7 @@
<xs:element name="Link" type="Link" />
<!-- HTML elements we want to let through. -->
<xs:element name="code" />
<xs:element name="pre" />
<xs:element name="br" />
<xs:element name="del" />
</xs:choice>
+10 -2
View File
@@ -106,7 +106,7 @@
font-family: monospace;
}
.descriptionText {
text-indent: 2em;
padding-left: 2em;
margin-top: 0;
margin-bottom: 0;
}
@@ -200,7 +200,7 @@
<link rel="icon" type="image/vnd.microsoft.icon" href="./favicon.ico"/>
</head>
<body>
<xsl:apply-templates />
<xsl:apply-templates />\
</body>
</html>
</xsl:template>
@@ -670,6 +670,14 @@
</xsl:apply-templates>
</code>
</xsl:template>
<xsl:template match="sm:pre">
<xsl:param name="curclass" />
<pre>
<xsl:apply-templates>
<xsl:with-param name="curclass" select="$curclass" />
</xsl:apply-templates>
</pre>
</xsl:template>
<xsl:template match="sm:br"><br /></xsl:template>
<xsl:template match="sm:del">
<del>