Skip to content

Commit

Permalink
make note normalization recursive (=double normalization has the same…
Browse files Browse the repository at this point in the history
… result) (#195 #157)
  • Loading branch information
matyaskopp committed Jun 8, 2023
1 parent 0763803 commit db9eaf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Scripts/parlamint-lib.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,11 @@
<xsl:variable name="noteOut2" select="replace($noteOut1,'^\s*\[\s*([^\[\]]*?)\s*\][\s\.]*$','$1')"/>
<xsl:variable name="noteOut3" select="replace($noteOut2,'^\s*/\s*([^/]*?)\s*/[\s\.]*$','$1')"/>
<xsl:variable name="noteOut4" select="replace($noteOut3,'^\s*\(\s*([^\(\)]*?)\s*\)[\s\.]*$','$1')"/>
<xsl:value-of select="$noteOut4"/>
<xsl:choose>
<xsl:when test="$noteIn = $noteOut4"><xsl:value-of select="$noteOut4"/></xsl:when>
<!-- make it recursive to make sure that double normalization has the same result -->
<xsl:otherwise><xsl:value-of select="mk:normalize-note($noteOut4)"/></xsl:otherwise>
</xsl:choose>
</xsl:function>

<!-- Format number-->
Expand Down

0 comments on commit db9eaf5

Please sign in to comment.