1.1 --- a/moinformat/resources/notugly.xsl Sun May 03 23:44:19 2020 +0200
1.2 +++ b/moinformat/resources/notugly.xsl Sun Aug 02 23:50:04 2020 +0200
1.3 @@ -6,7 +6,7 @@
1.4 http://www.hokstad.com/making-graphviz-output-pretty-with-xsl.html
1.5
1.6 Copyright (c) 2012 Vidar Hokstad <vidar@hokstad.com>
1.7 -Copyright (c) 2016, 2019 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (c) 2016, 2019, 2020 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 Permission is hereby granted, free of charge, to any person obtaining a
1.11 copy of this software and associated documentation files (the "Software"),
1.12 @@ -283,6 +283,8 @@
1.13
1.14
1.15 <xsl:template match="svg:g">
1.16 + <xsl:param name="class" select="@class"/>
1.17 +
1.18 <xsl:copy>
1.19 <xsl:apply-templates select="@*" />
1.20 <xsl:choose>
1.21 @@ -292,7 +294,7 @@
1.22 <xsl:copy>
1.23 <xsl:apply-templates select="@*" />
1.24 <xsl:call-template name="group">
1.25 - <xsl:with-param name="class" select="../@class"/>
1.26 + <xsl:with-param name="class" select="$class"/>
1.27 </xsl:call-template>
1.28 </xsl:copy>
1.29 </xsl:for-each>
1.30 @@ -312,7 +314,9 @@
1.31 <xsl:param name="class" select="@class"/>
1.32
1.33 <!-- Process any subgroups, apparent in Graphviz 2.38.0 output. -->
1.34 - <xsl:apply-templates select="svg:g"/>
1.35 + <xsl:apply-templates select="svg:g">
1.36 + <xsl:with-param name="class" select="$class"/>
1.37 + </xsl:apply-templates>
1.38
1.39 <!-- Produce shadows for nodes. -->
1.40 <xsl:for-each select="svg:polygon|svg:ellipse">
1.41 @@ -336,7 +340,9 @@
1.42
1.43 <xsl:for-each select="svg:polygon|svg:ellipse">
1.44 <xsl:sort select="@ry" order="descending" />
1.45 - <xsl:call-template name="poly-main" />
1.46 + <xsl:call-template name="poly-main">
1.47 + <xsl:with-param name="class" select="$class"/>
1.48 + </xsl:call-template>
1.49 </xsl:for-each>
1.50
1.51 <xsl:choose>
1.52 @@ -508,18 +514,22 @@
1.53 </xsl:template>
1.54
1.55 <xsl:template name="poly-main">
1.56 + <xsl:param name="class"/>
1.57 <xsl:element name="{name()}">
1.58 <xsl:apply-templates select="@*" />
1.59 - <xsl:call-template name="make-style-attribute">
1.60 - <xsl:with-param name="fill"
1.61 - select="normalize-space(substring-after(substring-before(@style,';'),'fill:'))"/>
1.62 - <xsl:with-param name="fill-explicit"
1.63 - select="@fill"/>
1.64 - <xsl:with-param name="stroke"
1.65 - select="normalize-space(substring-after(substring-after(@style,';'),'stroke:'))"/>
1.66 - <xsl:with-param name="stroke-explicit"
1.67 - select="@stroke"/>
1.68 - </xsl:call-template>
1.69 + <!-- Prevent edge polygons (such as arrowheads) from having gradients applied to them. -->
1.70 + <xsl:if test="$class != 'edge'">
1.71 + <xsl:call-template name="make-style-attribute">
1.72 + <xsl:with-param name="fill"
1.73 + select="normalize-space(substring-after(substring-before(@style,';'),'fill:'))"/>
1.74 + <xsl:with-param name="fill-explicit"
1.75 + select="@fill"/>
1.76 + <xsl:with-param name="stroke"
1.77 + select="normalize-space(substring-after(substring-after(@style,';'),'stroke:'))"/>
1.78 + <xsl:with-param name="stroke-explicit"
1.79 + select="@stroke"/>
1.80 + </xsl:call-template>
1.81 + </xsl:if>
1.82 </xsl:element>
1.83 </xsl:template>
1.84