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:
@@ -89,6 +89,7 @@
|
|||||||
<xs:element name="Link" type="Link" />
|
<xs:element name="Link" type="Link" />
|
||||||
<!-- HTML elements we want to let through. -->
|
<!-- HTML elements we want to let through. -->
|
||||||
<xs:element name="code" />
|
<xs:element name="code" />
|
||||||
|
<xs:element name="pre" />
|
||||||
<xs:element name="br" />
|
<xs:element name="br" />
|
||||||
<xs:element name="del" />
|
<xs:element name="del" />
|
||||||
</xs:choice>
|
</xs:choice>
|
||||||
|
|||||||
+10
-2
@@ -106,7 +106,7 @@
|
|||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
.descriptionText {
|
.descriptionText {
|
||||||
text-indent: 2em;
|
padding-left: 2em;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
<link rel="icon" type="image/vnd.microsoft.icon" href="./favicon.ico"/>
|
<link rel="icon" type="image/vnd.microsoft.icon" href="./favicon.ico"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<xsl:apply-templates />
|
<xsl:apply-templates />\
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
@@ -670,6 +670,14 @@
|
|||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</code>
|
</code>
|
||||||
</xsl:template>
|
</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:br"><br /></xsl:template>
|
||||||
<xsl:template match="sm:del">
|
<xsl:template match="sm:del">
|
||||||
<del>
|
<del>
|
||||||
|
|||||||
Reference in New Issue
Block a user