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:
@@ -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, '_', '<', @name, '>', .)"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- HTML-ish elements {{{1 -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user