diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2022-05-14 15:19:49 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2022-05-15 13:56:18 +0200 |
commit | cfa7975316e7fa8e88a2c2e06ad37240d1b6e057 (patch) | |
tree | 4c3373ce6d12cb599e68348d1d892a4ca2b4b40c /help3xsl/online_transform.xsl | |
parent | 789bc6e2c10536e5a876c5c4fb0126dbffe4dcbf (diff) |
Add SQL code colorization to Help pages
Change-Id: I2c74e63c67a323a6e6b726da352dd23e1a88d886
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/134329
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl/online_transform.xsl')
-rw-r--r-- | help3xsl/online_transform.xsl | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl index a9de0d4f5a..ab703aaca8 100644 --- a/help3xsl/online_transform.xsl +++ b/help3xsl/online_transform.xsl @@ -490,7 +490,7 @@ </xsl:call-template> </xsl:when> - <xsl:when test="@role='bascode' or @role='pycode'"> + <xsl:when test="@role='bascode' or @role='pycode' or @role='sqlcode'"> <xsl:call-template name="brand"> <xsl:with-param name="string" select="."/> </xsl:call-template> @@ -533,7 +533,7 @@ </xsl:call-template> </xsl:when> - <xsl:when test="@role='bascode' or @role='pycode'"> + <xsl:when test="@role='bascode' or @role='pycode' or @role='sqlcode'"> <xsl:call-template name="brand"> <xsl:with-param name="string" select="."/> </xsl:call-template> @@ -989,7 +989,6 @@ <pre dir="auto"><code class="language-visual-basic line-numbers"><xsl:apply-templates mode="embedded" /></code></pre> </div> </xsl:template> - <xsl:template match="pycode"> <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"> <xsl:attribute name="data-tooltip"><xsl:value-of select="$ui_copyclip"/></xsl:attribute> @@ -1003,6 +1002,19 @@ </div> </xsl:template> +<xsl:template match="sqlcode"> + <div class="sqlcode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"> + <xsl:attribute name="data-tooltip"><xsl:value-of select="$ui_copyclip"/></xsl:attribute> + <pre dir="auto"><code class="language-sql"><xsl:apply-templates /></code></pre> + </div> +</xsl:template> +<xsl:template match="sqlcode" mode="embedded"> + <div class="sqlcode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"> + <xsl:attribute name="data-tooltip"><xsl:value-of select="$ui_copyclip"/></xsl:attribute> + <pre dir="auto"><code class="language-sql"><xsl:apply-templates mode="embedded" /></code></pre> + </div> +</xsl:template> + <!-- Insert Logo code snippet --> <xsl:template name="insertlogocode"> <pre dir="auto"><xsl:apply-templates /></pre> |