[Libreoffice-commits] help.git: help3xsl/online_transform.xsl
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Dec 13 12:53:56 UTC 2018
help3xsl/online_transform.xsl | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 7db9d1ee3bb3626d99a6a58fe98eb185c65ddda5
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Thu Dec 13 10:17:56 2018 -0200
Commit: Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Thu Dec 13 13:53:34 2018 +0100
Add support for python code scripts
Introduced <pycode> section and "pycode" role for paragraphs
with same behaviour as BASIC coounterparts.
Used to list python scripts examples ans code fragments
in help pages
Change-Id: Ica76bcc65dcf422a1eb4b7f39a6d671b2e4e573c
Reviewed-on: https://gerrit.libreoffice.org/65097
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index e5671e22f..e69d22310 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -553,7 +553,7 @@
<xsl:apply-templates />
</xsl:when>
- <xsl:when test="@role='bascode'">
+ <xsl:when test="@role='bascode' or @role='pycode'">
<xsl:value-of select="." />
</xsl:when>
@@ -949,6 +949,13 @@
<div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"><pre><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"><pre><code class="language-python line-numbers"><xsl:apply-templates /></code></pre></div>
+</xsl:template>
+<xsl:template match="pycode" mode="embedded">
+ <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet"><pre><code class="language-python line-numbers"><xsl:apply-templates mode="embedded" /></code></pre></div>
+</xsl:template>
+
<!-- Insert Logo code snippet -->
<xsl:template name="insertlogocode">
<pre><xsl:apply-templates /></pre>
More information about the Libreoffice-commits
mailing list