From 8ac38f574a96c57615e1047d033ad5b6d38d37f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 17 Jun 2021 20:26:02 +0200 Subject: g.tmac: Fix environment stack underflow --- g.tmac | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/g.tmac b/g.tmac index f325daa..eb17536 100644 --- a/g.tmac +++ b/g.tmac @@ -1,30 +1,29 @@ .eo -.\" s -- setup document (configurable) -.de s -.sp 1i -._d t \" title -. ps +4p -. vs +2p -. ft B -. ad c -._d -._d n \" name (of author) -. ad c -._d -._d d \" date -. ad c -._d -._d p \" paragraph -. ad b -._d +.\" _s -- setup document (configurable) +.de _s +. sp 1i +. _d t \" title +. ps +4p +. vs +2p +. ft B +. ad c +. _d n \" name (of author) +. ad c +. _d d \" date +. ad c +. _d p \" paragraph +. ad b +. _d .. .\" _d -- define environment .de _d -. ev \$1 +. if !'\n[.ev]'0' .ev +. if !'\$1'' .ev \$1 .. .\" _e -- enter environment .de _e -. ev +.br +. if !'\n[.ev]'0' .ev . ds penv \*[env] . ds env \$1 . ev \$1 @@ -70,4 +69,4 @@ \$3\f(BI\$1\fP\$2 .. .ec -.s +._s -- cgit v1.2.3