diff options
author | Adrian Kummerlaender | 2017-02-10 18:48:51 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2017-02-10 18:48:51 +0100 |
commit | a408f3281cb48e6442675784da3da8b1063e8aa5 (patch) | |
tree | 22a1ecf05db56e13729f8d29240f1f8567abba50 | |
parent | f5d7e9b752a446883e2d57456b3bdb1c3ba996f8 (diff) | |
download | Overview-a408f3281cb48e6442675784da3da8b1063e8aa5.tar Overview-a408f3281cb48e6442675784da3da8b1063e8aa5.tar.gz Overview-a408f3281cb48e6442675784da3da8b1063e8aa5.tar.bz2 Overview-a408f3281cb48e6442675784da3da8b1063e8aa5.tar.lz Overview-a408f3281cb48e6442675784da3da8b1063e8aa5.tar.xz Overview-a408f3281cb48e6442675784da3da8b1063e8aa5.tar.zst Overview-a408f3281cb48e6442675784da3da8b1063e8aa5.zip |
Use `pandoc` as markdown processor
analogously to blog.kummerlaender.eu
-rw-r--r-- | utility/formatter.xsl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/utility/formatter.xsl b/utility/formatter.xsl index 2c7f3b9..57edf2d 100644 --- a/utility/formatter.xsl +++ b/utility/formatter.xsl @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" + xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" xmlns:InputXSLT="function.inputxslt.application" @@ -17,7 +18,7 @@ )/self::command/node()"/> </xsl:template> -<xsl:template name="highlighter"> +<xsl:template name="code_highlighter"> <xsl:param name="source"/> <xsl:param name="language"/> @@ -43,12 +44,12 @@ </xsl:template> <xsl:template match="pre" mode="embellish"> - <xsl:call-template name="highlighter"> + <xsl:call-template name="code_highlighter"> <xsl:with-param name="source" select="code/text()"/> <xsl:with-param name="language"> <xsl:choose> - <xsl:when test="code/@class"> - <xsl:value-of select="substring(code/@class, 10, string-length(code/@class))"/> + <xsl:when test="@class"> + <xsl:value-of select="@class"/> </xsl:when> <xsl:otherwise> <xsl:text>txt</xsl:text> @@ -63,7 +64,7 @@ <xsl:variable name="content"> <xsl:call-template name="plain_formatter"> - <xsl:with-param name="format">kramdown</xsl:with-param> + <xsl:with-param name="format">pandoc -f markdown -t html --no-highlight</xsl:with-param> <xsl:with-param name="source" select="$source"/> </xsl:call-template> </xsl:variable> |