]> Lady’s Gitweb - LesML/commitdiff
Better handle id‐less pilcrows current 0.3.0
authorLady <redacted>
Sat, 19 Oct 2024 22:57:17 +0000 (18:57 -0400)
committerLady <redacted>
Sat, 19 Oct 2024 22:57:17 +0000 (18:57 -0400)
A pilcrow is useful to “force” a paragraph when it would otherwise
start with a sigil. These pilcrows may not have id’s; this should be
supported.

parser.xslt

index d11dfe6ebfb263129928ec028ef274cf6875044e..2f028c2036f24f1dea89455a7fed05185663c4b5 100644 (file)
@@ -105,9 +105,12 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                        <when test="starts-with($source, '¶')">
                                <choose>
                                        <when test="contains($source, ' ')">
-                                               <attribute name="id">
-                                                       <value-of select="substring-before(substring-after($source, '¶'), ' ')"/>
-                                               </attribute>
+                                               <variable name="id" select="substring-before(substring-after($source, '¶'), ' ')"/>
+                                               <if test="$id!=''">
+                                                       <attribute name="id">
+                                                               <value-of select="$id"/>
+                                                       </attribute>
+                                               </if>
                                                <value-of select="substring-after($source, ' ')"/>
                                        </when>
                                        <otherwise>
This page took 0.0457 seconds and 4 git commands to generate.