aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xsl/lang.highlight.m4.xsl')
-rw-r--r--xsl/lang.highlight.m4.xsl26
1 files changed, 16 insertions, 10 deletions
diff --git a/xsl/lang.highlight.m4.xsl b/xsl/lang.highlight.m4.xsl
index d15718b..9d75967 100644
--- a/xsl/lang.highlight.m4.xsl
+++ b/xsl/lang.highlight.m4.xsl
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
xmlns:str="http://exslt.org/strings"
xmlns:exslt="http://exslt.org/common"
@@ -40,14 +41,14 @@
<xsl:call-template name="lang.highlight.m4.subtokenate">
<xsl:with-param name="data" select="substring-after($data, '[')"/>
<xsl:with-param name="nokeywords" select="$nokeywords"/>
- </xsl:call-template>
+ </xsl:call-template>
</xsl:when>
<xsl:when test="substring($data, string-length($data)) = ')'">
<xsl:call-template name="lang.highlight.m4.subtokenate">
<xsl:with-param name="data" select="substring($data, 1, string-length($data)-1)"/>
<xsl:with-param name="nokeywords" select="$nokeywords"/>
- </xsl:call-template>
+ </xsl:call-template>
<span class="Special">)</span>
</xsl:when>
@@ -55,7 +56,7 @@
<xsl:call-template name="lang.highlight.m4.subtokenate">
<xsl:with-param name="data" select="substring($data, 1, string-length($data)-2)"/>
<xsl:with-param name="nokeywords" select="$nokeywords"/>
- </xsl:call-template>
+ </xsl:call-template>
<span class="Special">],</span>
</xsl:when>
@@ -63,7 +64,7 @@
<xsl:call-template name="lang.highlight.m4.subtokenate">
<xsl:with-param name="data" select="substring($data, 1, string-length($data)-1)"/>
<xsl:with-param name="nokeywords" select="$nokeywords"/>
- </xsl:call-template>
+ </xsl:call-template>
<span class="Special">,</span>
</xsl:when>
@@ -81,7 +82,7 @@
$data = 'while' or $data = 'do' or $data = 'read' or $data = 'done' or $data = 'make' or $data = 'echo' or $data = 'cd' or $data = 'local' or $data = 'return' or
$data = 'for' or $data = 'case' or $data = 'esac' or $data = 'in' or $data = '-n' or $data = '[' or $data = ']' or
$data = '-z' or $data = '-f' or $data = '&lt;&lt;-' or $data = '&gt;' or $data = 'EOF' or $data = 'test'">
- <span class="Statement"><xsl:value-of select="$data"/></span>
+ <span class="Statement"><xsl:value-of select="$data"/></span>
</xsl:when>
<!-- No match return -->
@@ -101,7 +102,7 @@
<xsl:for-each select="exslt:node-set($tokenizedData)">
<xsl:variable name="myPos" select="position()"/>
<xsl:variable name="quotePos" select="count(../*[@delimiter='&quot;' and position() &lt; $myPos])"/>
-
+
<xsl:choose>
<xsl:when test="../*[position()=1] = 'dnl'">
<span class="Comment"><xsl:value-of select="."/></span>
@@ -109,7 +110,7 @@
<!-- Highlight a quote -->
<xsl:when test=". = '&quot;'">
- <span class="Statement">&quot;</span>
+ <span class="Statement">&quot;</span>
</xsl:when>
<!-- If we're inside quotes stop here -->
@@ -123,7 +124,7 @@
</xsl:when>
<!-- Highlight variable assignments;
- @regexp = [\w]=["']{...}['"] -->
+ @regexp = [\w]=["']{...}['"] -->
<xsl:when test="contains(., '=')">
<xsl:call-template name="lang.highlight.m4.subtokenate">
<xsl:with-param name="data" select="substring-before(., '=')"/>
@@ -137,11 +138,16 @@
<!-- No match return -->
<xsl:otherwise>
<xsl:call-template name="lang.highlight.m4.subtokenate">
- <xsl:with-param name="data" select="."/>
- </xsl:call-template>
+ <xsl:with-param name="data" select="."/>
+ </xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
+
+<!-- Local Variables: -->
+<!-- indent-tabs-mode: nil -->
+<!-- fill-column: 120 -->
+<!-- End: -->