1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-10 04:35:51 +01:00

Because I can.

This commit is contained in:
Kris Maglione
2011-08-21 00:47:18 -04:00
parent cef61c8733
commit 1607affa58
19 changed files with 802 additions and 786 deletions

View File

@@ -296,14 +296,18 @@
<xsl:template name="linkify-tag">
<xsl:param name="contents" select="text()"/>
<xsl:variable name="tag" select="$contents"/>
<xsl:variable name="tag-url" select="
regexp:replace(regexp:replace($tag, '%', 'g', '%25'),
'#', 'g', '%23')"/>
<a style="color: inherit;">
<xsl:if test="not(@link) or @link != 'false'">
<xsl:choose>
<xsl:when test="contains(ancestor::*/@document-tags, concat(' ', $tag, ' '))">
<xsl:attribute name="href">#<xsl:value-of select="$tag"/></xsl:attribute>
<xsl:attribute name="href">#<xsl:value-of select="$tag-url"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="href">dactyl://help-tag/<xsl:value-of select="$tag"/></xsl:attribute>
<xsl:attribute name="href">dactyl://help-tag/<xsl:value-of select="$tag-url"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:if>