Permalink
Browse files

Fix local link in Markdown output #36

Signed-off-by: Jarno Elovirta <jarno@elovirta.com>
  • Loading branch information...
jelovirt committed Feb 3, 2019
1 parent 07c27e1 commit 2e41c356bb72ab70bc1eb6a4cee8e27f75dba651
Showing with 9 additions and 2 deletions.
  1. +9 −2 src/main/resources/rel-links.xsl
@@ -334,8 +334,15 @@ Each child is indented, the linktext is bold, and the shortdesc appears in norma
</xsl:when>
<!-- For DITA - process the internal href -->
<xsl:when test="starts-with(@href, '#')">
<xsl:text>#</xsl:text>
<xsl:value-of select="dita-ot:get-element-id(@href)"/>
<xsl:choose>
<xsl:when test="contains(@href, '/')">
<xsl:text>#</xsl:text>
<xsl:value-of select="dita-ot:get-element-id(@href)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@href"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- It's to a DITA file - process the file name (adding the html extension)
and process the rest of the href -->

0 comments on commit 2e41c35

Please sign in to comment.