From 664170799544a64616b93461ae0e2b04a457626f Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 22 Feb 2023 21:51:19 +0200 Subject: [Presentation] ftags are properly ignored inside code tags --- awk-edits/Presentation.awk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/awk-edits/Presentation.awk b/awk-edits/Presentation.awk index cb51fe9..7fd6120 100644 --- a/awk-edits/Presentation.awk +++ b/awk-edits/Presentation.awk @@ -183,6 +183,8 @@ BEGIN { rep[ 5] = "
" # (layout-row > * is td) rep[ 6] = "
" #
rep[ 7] = "" # &&/font + + presInsideCode = 0 } function presentationSubstitute(ind) { @@ -192,7 +194,15 @@ function presentationSubstitute(ind) { gsub(cpat[ind], crep[ind]) } -nopresentation == 0 && /^[ \t]*(

|)&&/ { +nopresentation == 0 && // { + presInsideCode = 1 +} + +nopresentation == 0 && /<\/code>/ { + presInsideCode = 0 +} + +nopresentation == 0 && presInsideCode == 0 && /^[ \t]*(

|)&&/ { for (i = 1; i <= length(names); i++) { if (index($0, names[i]) != 0) presentationSubstitute(i) -- cgit v1.3.1-26-gb76a