diff options
[Presentation] ftags are properly ignored inside code tags
1 files changed, 11 insertions, 1 deletions
| -rw-r--r-- | awk-edits/Presentation.awk | 12 |
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>|)&&/ { +nopresentation == 0 && /<code>/ { + presInsideCode = 1 +} + +nopresentation == 0 && /<\/code>/ { + presInsideCode = 0 +} + +nopresentation == 0 && presInsideCode == 0 && /^[ \t]*(<p>|)&&/ { for (i = 1; i <= length(names); i++) { if (index($0, names[i]) != 0) presentationSubstitute(i) |