]> Lady’s Gitweb - LesML/commitdiff
Drop empty shebang documents
authorLady <redacted>
Sat, 26 Apr 2025 03:16:03 +0000 (23:16 -0400)
committerLady <redacted>
Sat, 26 Apr 2025 03:35:23 +0000 (23:35 -0400)
Previously, a shebang forced a document to be output, even if it was
empty. However, this conflicts with the ability to add document
comments at the beginning of a document where the shebang is serving as
a magic number (for example, copyright comments): This would create two
documents, one for the shebang and a second one for the final comment.
Now, empty documents will be dropped regardless of whether they use the
shebang or comment syntax.

parser.xslt

index e726a9e9953b1f744e346f653c0218b679fcd1e3..42d5937220a5a2c99def1c15cc975b8aa0387e16 100644 (file)
@@ -219,7 +219,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                <value-of select="substring-after($first-line, '##')"/>
                        </comment>
                </if>
-               <if test="$shebang!='' or $doclines[normalize-space()!='']">
+               <if test="$doclines[normalize-space()!='']">
                        <variable name="record-separators" select="$doclines[starts-with(., '%%')]"/>
                        <element name="article" namespace="&xhtml;">
                                <for-each select="$params/html:div/html:dt[string()=' LANG ']">
This page took 0.061114 seconds and 4 git commands to generate.