From 01f27f6ee3dad6f25cecc27e7051380644733066 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 2 Oct 2023 13:19:53 +0200 Subject: Detail how to have empty non-void tags --- gsp.5 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gsp.5 b/gsp.5 index ae04f0a..96d8ae6 100644 --- a/gsp.5 +++ b/gsp.5 @@ -1,4 +1,4 @@ -.Dd $Mdocdate: September 11 2023 $ +.Dd $Mdocdate: October 2 2023 $ .Dt GSP 5 .Os .Sh NAME @@ -85,6 +85,15 @@ with two empty div-nodes as children: .Bd -literal -offset indent footer foo bar { div{} div{} } .Ed +.Pp +When compiling an empty node +.Ql foo{} , +you get the result +.Ql . +If you want both an opening- and closing tag with no children, such as in +.Ql , +then you can use an empty text-node as in +.Ql foo{-} . .Ss Node names Node names follow the exact same naming rules as names do in XML. See the XML reference in -- cgit v1.2.3