From bf8760acd850970ae15e377cd041a56efdfd47d0 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 3 May 2020 10:50:47 +0200 Subject: testing simpler envtotei() --- ekdosis.dtx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index 6e0bf42..b3f6d33 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -1744,18 +1744,18 @@ local function envtotei(str) then if isfound(close_p, envtotags[i].b) then - if envtotags[i].b == "p" - then + -- if envtotags[i].b == "p" + -- then str = gsub(str, (lpeg.P("\\par") + lpeg.P("

")) * spcenc^-1 * lpeg.P("\\begin") * spcenc^-1 * lpeg.P("{") * lpeg.Cs(envtotags[i].a) * lpeg.P("}") * bcbracesii * spcenc^-1, "\n<"..envtotags[i].b..envtotags[i].c..">") - else - str = gsub(str, (lpeg.P("\\par") + lpeg.P("

")) * spcenc^-1 * lpeg.P("\\begin") * spcenc^-1 * lpeg.P("{") - * lpeg.Cs(envtotags[i].a) * lpeg.P("}") - * bcbracesii * spcenc^-1, - "

\n<"..envtotags[i].b..envtotags[i].c..">") - end + -- else + -- str = gsub(str, (lpeg.P("\\par") + lpeg.P("

")) * spcenc^-1 * lpeg.P("\\begin") * spcenc^-1 * lpeg.P("{") + -- * lpeg.Cs(envtotags[i].a) * lpeg.P("}") + -- * bcbracesii * spcenc^-1, + -- "

\n<"..envtotags[i].b..envtotags[i].c..">") + -- end str = gsub(str, spcenc^-1 * lpeg.P("\\end") * spcenc^-1 * lpeg.P("{") * lpeg.Cs(envtotags[i].a) * lpeg.P("}") * spcenc^-1 * (lpeg.P("\\par") + lpeg.P("

")), "\n

") -- cgit v1.2.3