From: Lady <redacted>
Date: Sat, 26 Apr 2025 03:24:11 +0000 (-0400)
Subject: Wrap results in a div
X-Git-Tag: 0.5.0~7
X-Git-Url: https://git.ladys.computer/LesML/commitdiff_plain/36d58e6ef941e53b6da13b83b0d73f1d95a3dffc?ds=inline;hp=6590f6413b72dbe0762dbfe847c2ffe06379a7e4

Wrap results in a div

Even in the case where there is only one document, there may be
additional document comments which should be grouped alongside it and
not intermixed with any comments in the surrounding area. For the case
when there is only one document and nothing else, not even a comment,
it is probably better to still wrap the output for consistency.
---

diff --git a/parser.xslt b/parser.xslt
index 42d5937..227e285 100644
--- a/parser.xslt
+++ b/parser.xslt
@@ -639,9 +639,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
 				</with-param>
 			</call-template>
 		</variable>
-		<call-template name="LesML:parse">
-			<with-param name="lines" select="exsl:node-set($lines-fragment)/*"/>
-		</call-template>
+		<element name="div" namespace="&xhtml;">
+			<call-template name="LesML:parse">
+				<with-param name="lines" select="exsl:node-set($lines-fragment)/*"/>
+			</call-template>
+		</element>
 	</template>
 	<template match="html:blockquote" mode="LesML:finalize-tree">
 		<if test="not(preceding-sibling::node()) or preceding-sibling::node()[position()=1 and not(self::html:blockquote)]">