Skip to content

Commit

Permalink
letter-spacing processing improved, to avoid problems with key functi…
Browse files Browse the repository at this point in the history
…ons and negative letter-spacing which could not be casted to integer
  • Loading branch information
polypunkt committed Oct 25, 2021
1 parent 298b0c9 commit 3ae55cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conf/conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@
<xsl:variable name="text-style-elements" select="'phrase', 'superscript', 'subscript'" as="xs:string+"/>

<template context="*[local-name() = $text-style-elements]
[ (@css:letter-spacing and xs:integer(replace(@css:letter-spacing, '[a-z]+$', '')) gt 0.5)
or exists(key('style', @role)[xs:integer(replace(@css:letter-spacing, '[a-z]+$', '')) gt 0.5])]">
[ (@css:letter-spacing and xs:double(replace(@css:letter-spacing, '[a-z]+$', '')) gt 0.5)
or exists(key('style', @role)[@css:letter-spacing[xs:double(replace(., '[a-z]+$', '')) gt 0.5]])]">
<xsl:text>\so{</xsl:text>
<xsl:next-match/>
<xsl:text>}</xsl:text>
Expand Down

0 comments on commit 3ae55cf

Please sign in to comment.