help3xsl/online_transform.xsl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 7db9d1ee3bb3626d99a6a58fe98eb185c65ddda5 Author: Olivier Hallot <olivier.hal...@libreoffice.org> AuthorDate: Thu Dec 13 10:17:56 2018 -0200 Commit: Olivier Hallot <olivier.hal...@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.hal...@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> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits