diff options
author | Robert Alessi <alessi@robertalessi.net> | 2020-05-03 10:50:47 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2020-05-03 10:50:47 +0200 |
commit | bf8760acd850970ae15e377cd041a56efdfd47d0 (patch) | |
tree | 4cf034646c12443f7e37e2173d9be4f674b22336 | |
parent | e7ccb49757db20324d9264cb4b20d9e531d8dee9 (diff) | |
download | ekdosis-bf8760acd850970ae15e377cd041a56efdfd47d0.tar.gz |
testing simpler envtotei()
-rw-r--r-- | ekdosis.dtx | 16 |
1 files 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) | |||
1744 | then | 1744 | then |
1745 | if isfound(close_p, envtotags[i].b) | 1745 | if isfound(close_p, envtotags[i].b) |
1746 | then | 1746 | then |
1747 | if envtotags[i].b == "p" | 1747 | -- if envtotags[i].b == "p" |
1748 | then | 1748 | -- then |
1749 | str = gsub(str, (lpeg.P("\\par") + lpeg.P("<p>")) * spcenc^-1 * lpeg.P("\\begin") * spcenc^-1 * lpeg.P("{") | 1749 | str = gsub(str, (lpeg.P("\\par") + lpeg.P("<p>")) * spcenc^-1 * lpeg.P("\\begin") * spcenc^-1 * lpeg.P("{") |
1750 | * lpeg.Cs(envtotags[i].a) * lpeg.P("}") | 1750 | * lpeg.Cs(envtotags[i].a) * lpeg.P("}") |
1751 | * bcbracesii * spcenc^-1, | 1751 | * bcbracesii * spcenc^-1, |
1752 | "\n<"..envtotags[i].b..envtotags[i].c..">") | 1752 | "\n<"..envtotags[i].b..envtotags[i].c..">") |
1753 | else | 1753 | -- else |
1754 | str = gsub(str, (lpeg.P("\\par") + lpeg.P("<p>")) * spcenc^-1 * lpeg.P("\\begin") * spcenc^-1 * lpeg.P("{") | 1754 | -- str = gsub(str, (lpeg.P("\\par") + lpeg.P("<p>")) * spcenc^-1 * lpeg.P("\\begin") * spcenc^-1 * lpeg.P("{") |
1755 | * lpeg.Cs(envtotags[i].a) * lpeg.P("}") | 1755 | -- * lpeg.Cs(envtotags[i].a) * lpeg.P("}") |
1756 | * bcbracesii * spcenc^-1, | 1756 | -- * bcbracesii * spcenc^-1, |
1757 | "</p>\n<"..envtotags[i].b..envtotags[i].c..">") | 1757 | -- "</p>\n<"..envtotags[i].b..envtotags[i].c..">") |
1758 | end | 1758 | -- end |
1759 | str = gsub(str, spcenc^-1 * lpeg.P("\\end") * spcenc^-1 * lpeg.P("{") | 1759 | str = gsub(str, spcenc^-1 * lpeg.P("\\end") * spcenc^-1 * lpeg.P("{") |
1760 | * lpeg.Cs(envtotags[i].a) * lpeg.P("}") * spcenc^-1 * (lpeg.P("\\par") + lpeg.P("</p>")), | 1760 | * lpeg.Cs(envtotags[i].a) * lpeg.P("}") * spcenc^-1 * (lpeg.P("\\par") + lpeg.P("</p>")), |
1761 | "</"..envtotags[i].b..">\n<p>") | 1761 | "</"..envtotags[i].b..">\n<p>") |