diff options
author | Shaun McCance <shaunm@redhat.com> | 2019-01-12 16:29:16 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@redhat.com> | 2019-01-12 16:29:51 -0500 |
commit | 980a9dd95e8da8db56ef841f11b2b9182d7c3b64 (patch) | |
tree | f9e982fe8b425e90af9093997dc2bb0c23756023 | |
parent | 19358d6255dc3ca674d90a9ef598c00419d2dae9 (diff) | |
download | yelp-xsl-980a9dd95e8da8db56ef841f11b2b9182d7c3b64.tar.gz |
mal2html-inline: Use HTML ins/del for hi elements with those styles
-rw-r--r-- | xslt/mallard/html/mal2html-inline.xsl | 19 | ||||
-rw-r--r-- | xslt/mallard/html/mal2html-page.xsl | 2 |
2 files changed, 21 insertions, 0 deletions
diff --git a/xslt/mallard/html/mal2html-inline.xsl b/xslt/mallard/html/mal2html-inline.xsl index 5c4f2fb8..4eeebc58 100644 --- a/xslt/mallard/html/mal2html-inline.xsl +++ b/xslt/mallard/html/mal2html-inline.xsl @@ -260,6 +260,25 @@ an `xref` or `href` attribute. </xsl:call-template> </xsl:template> +<xsl:template mode="mal2html.inline.content.mode" match="mal:hi"> + <xsl:variable name="style" select="concat(' ', @style, ' ')"/> + <xsl:choose> + <xsl:when test="contains($style, ' ins ')"> + <ins> + <xsl:apply-templates mode="mal2html.inline.mode"/> + </ins> + </xsl:when> + <xsl:when test="contains($style, ' del ')"> + <del> + <xsl:apply-templates mode="mal2html.inline.mode"/> + </del> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates mode="mal2html.inline.mode"/> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + <!-- = key = --> <xsl:template mode="mal2html.inline.mode" match="mal:key"> <xsl:call-template name="mal2html.span"/> diff --git a/xslt/mallard/html/mal2html-page.xsl b/xslt/mallard/html/mal2html-page.xsl index c2a01e7e..8d041221 100644 --- a/xslt/mallard/html/mal2html-page.xsl +++ b/xslt/mallard/html/mal2html-page.xsl @@ -1438,6 +1438,8 @@ span.hi.hi-del { <xsl:value-of select="$color.bg.red"/><xsl:text>; text-decoration: line-through; } +span.hi.hi-ins ins { text-decoration: none; } +span.hi.hi-del del { text-decoration: none; } span.hi.hi-red { background-color: </xsl:text> <xsl:value-of select="$color.bg.red"/><xsl:text>; } span.hi.hi-orange { background-color: </xsl:text> |