]> Lady’s Gitweb - LesML/blobdiff - parser.xslt
Support “comment” paragraphs
[LesML] / parser.xslt
index d35d53ba18ce44f8999ed2c2318e8e0e1dfafd0f..a93f42558110a632c34d80be2c1898a7ac5e7e70 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)]]"/>
                <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>
                <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>
                                                                        </for-each>
                                                                </html:dl>
                                                        </if>
+                                                       <if test=".!='%%'">
+                                                               <comment>
+                                                                       <value-of select="substring-after(., '%%')"/>
+                                                               </comment>
+                                                       </if>
                                                </for-each>
                                        </html:footer>
                                </if>
                                                </for-each>
                                        </html:footer>
                                </if>
@@ -450,6 +460,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                                        </html:p>
                                                                </html:div>
                                                        </when>
                                                                        </html:p>
                                                                </html:div>
                                                        </when>
+                                                       <when test="starts-with($text, '# ')">
+                                                               <comment>
+                                                                       <value-of select="substring-after($text, '# ')"/>
+                                                               </comment>
+                                                       </when>
                                                        <otherwise>
                                                                <html:p>
                                                                        <call-template name="LesML:id-and-contents">
                                                        <otherwise>
                                                                <html:p>
                                                                        <call-template name="LesML:id-and-contents">
This page took 0.02237 seconds and 4 git commands to generate.