Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit664170799544a64616b93461ae0e2b04a457626f (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-02-22 21:51:19 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-02-22 21:51:19 +0200
Files874f3e45e7846ab1069b2d5235064e426b87abdb
syndamia.com-664170799544a64616b93461ae0e2b04a457626f.tar
syndamia.com-664170799544a64616b93461ae0e2b04a457626f.tar.gz
syndamia.com-664170799544a64616b93461ae0e2b04a457626f.zip
Parent1ec56a6ca9959a6cc62ce77063ce0ab73e43dcfc (diff)
[Presentation] ftags are properly ignored inside code tags
1 files changed, 11 insertions, 1 deletions
-rw-r--r--awk-edits/Presentation.awk12
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] = "<div class=\"layout-table fixed-layout\"><div class=\"layout-row\">" # <table><tr> (layout-row > * is td)
rep[ 6] = "</div><div class=\"layout-row\">" # </tr><tr>
rep[ 7] = "</div>" # &&/font
+
+ presInsideCode = 0
}
function presentationSubstitute(ind) {
@@ -192,7 +194,15 @@ function presentationSubstitute(ind) {
gsub(cpat[ind], crep[ind])
}
-nopresentation == 0 && /^[ \t]*(<p>|)&#38;&#38;/ {
+nopresentation == 0 && /<code>/ {
+ presInsideCode = 1
+}
+
+nopresentation == 0 && /<\/code>/ {
+ presInsideCode = 0
+}
+
+nopresentation == 0 && presInsideCode == 0 && /^[ \t]*(<p>|)&#38;&#38;/ {
for (i = 1; i <= length(names); i++) {
if (index($0, names[i]) != 0)
presentationSubstitute(i)