]> Lady’s Gitweb - LesML/commitdiff
Preserve document and record‐jar comments
authorLady <redacted>
Sat, 19 Oct 2024 19:37:08 +0000 (15:37 -0400)
committerLady <redacted>
Sat, 19 Oct 2024 19:37:08 +0000 (15:37 -0400)
parser.xslt

index d35d53ba18ce44f8999ed2c2318e8e0e1dfafd0f..de60b8fd0422dd68ad67227fd73ba718456d5d05 100644 (file)
@@ -189,6 +189,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                <variable name="noshebang" select="$lines[position()>1 or not(starts-with(., '#!lesml') or starts-with(., '##'))]"/>
                <variable name="docsep" select="$noshebang[starts-with(., '#!lesml') or starts-with(., '##')][1]"/>
                <variable name="doclines" select="$noshebang[not($docsep) or following-sibling::*[generate-id()=generate-id($docsep)]]"/>
+               <if test="starts-with($first-line, '##') and $first-line!='##'">
+                       <comment>
+                               <value-of select="substring-after($first-line, '##')"/>
+                       </comment>
+               </if>
                <if test="$shebang!='' or $doclines[normalize-space()!='']">
                        <variable name="record-separators" select="$doclines[starts-with(., '%%')]"/>
                        <html:article>
@@ -259,6 +264,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                                        </for-each>
                                                                </html:dl>
                                                        </if>
+                                                       <if test=".!='%%'">
+                                                               <comment>
+                                                                       <value-of select="substring-after(., '%%')"/>
+                                                               </comment>
+                                                       </if>
                                                </for-each>
                                        </html:footer>
                                </if>
This page took 0.022252 seconds and 4 git commands to generate.