1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-23 16:15:46 +01:00

Standardize formatting of :set examples in :help.

This commit is contained in:
Kris Maglione
2010-12-17 09:04:46 -05:00
parent 7386117f00
commit 714870525e
6 changed files with 47 additions and 22 deletions

View File

@@ -454,6 +454,31 @@
</span>
</xsl:template>
<xsl:template match="dactyl:se" mode="help-2">
<xsl:variable name="nodes" xmlns="&xmlns.dactyl;">
<ex>:set</ex>
<xsl:text> </xsl:text>
<link topic="'{@opt}'"><hl key="HelpOpt"><xsl:value-of select="@opt"/></hl></link>
<xsl:choose>
<xsl:when test="@op and @op != ''"><xsl:value-of select="@op"/></xsl:when>
<xsl:otherwise>=</xsl:otherwise>
</xsl:choose>
<xsl:copy-of select="@*|node()"/>
</xsl:variable>
<xsl:apply-templates select="exsl:node-set($nodes)" mode="help-1"/>
</xsl:template>
<xsl:template match="dactyl:set" mode="help-2">
<xsl:variable name="nodes">
<code xmlns="&xmlns.dactyl;">
<se opt="{@opt}" op="{@op}">
<xsl:copy-of select="@*|node()"/>
</se>
</code>
</xsl:variable>
<xsl:apply-templates select="exsl:node-set($nodes)" mode="help-1"/>
</xsl:template>
<xsl:template match="dactyl:description | dactyl:example | dactyl:spec" mode="help-2">
<div>
<xsl:if test="self::dactyl:description"><xsl:attribute name="dactyl:highlight">HelpDescription</xsl:attribute></xsl:if>