[yelp-xsl] mal2html-inline: Use HTML ins/del for hi elements with those styles
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] mal2html-inline: Use HTML ins/del for hi elements with those styles
- Date: Sat, 12 Jan 2019 21:30:15 +0000 (UTC)
commit 980a9dd95e8da8db56ef841f11b2b9182d7c3b64
Author: Shaun McCance <shaunm redhat com>
Date: Sat Jan 12 16:29:16 2019 -0500
mal2html-inline: Use HTML ins/del for hi elements with those styles
xslt/mallard/html/mal2html-inline.xsl | 19 +++++++++++++++++++
xslt/mallard/html/mal2html-page.xsl | 2 ++
2 files changed, 21 insertions(+)
---
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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]