]> Lady’s Gitweb - LesML/commitdiff
Drop empty shebang documents
authorLady <redacted>
Sat, 26 Apr 2025 03:16:03 +0000 (23:16 -0400)
committerLady <redacted>
Tue, 31 Mar 2026 02:04:23 +0000 (22:04 -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 b55089ac8319839d6be2138fb25df6651526bf594753bacb192d4a7d8743fefb..1fb346b18e1607be99b7fab09ee9c76da44fcdb3e2fede93259da42b53915c9b 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.225737 seconds and 4 git commands to generate.