1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 00:34:11 +01:00

Make the <k> tag mode-aware.

Previously there was no way to produce links to the appropriate mode-specific
binding of a key using the <k> tag (e.g., <Tab> in the documentation always
linked to the Normal-mode command, although its command-line functionality is
different).  This commit introduces a `mode' attribute to the <k> tag, making
the distinction possible.
This commit is contained in:
Štěpán Němec
2010-09-25 02:18:17 +02:00
parent 0c34437805
commit 223859a33b
5 changed files with 55 additions and 10 deletions

View File

@@ -328,6 +328,20 @@
</xsl:call-template>
</span>
</xsl:template>
<xsl:template match="dactyl:k[@mode]" mode="help-2">
<span dactyl:highlight="HelpKey">
<xsl:call-template name="linkify-tag">
<xsl:with-param name="contents" select="concat(@mode, '_', text())"/>
</xsl:call-template>
</span>
</xsl:template>
<xsl:template match="dactyl:k[@mode and @name]" mode="help-2">
<span dactyl:highlight="HelpKey">
<xsl:call-template name="linkify-tag">
<xsl:with-param name="contents" select="concat(@mode, '_', '&lt;', @name, '>', .)"/>
</xsl:call-template>
</span>
</xsl:template>
<!-- HTML-ish elements {{{1 -->