Summary Files Commits Branches @commit @diff @stats
path: root / awk-edits / Presentation.awk
diff options
context:
space:
mode:
1 files changed, 4 insertions, 5 deletions
-rw-r--r--awk-edits/Presentation.awk9
diff --git a/awk-edits/Presentation.awk b/awk-edits/Presentation.awk
index 9fd64e3..4d3826a 100644
--- a/awk-edits/Presentation.awk
+++ b/awk-edits/Presentation.awk
@@ -1,3 +1,4 @@
+# .*(slides|teaching)/.*html
#
# == About ==
#
@@ -87,8 +88,6 @@
# Refer to src/talks/demo/index.md
BEGIN {
- nopresentation=!(substr(ARGV[1], "slides") || substr(ARGV[1], "teaching")) # FILENAME isn't available yet
-
# names is name of ftag, meaning if `names[i] = "examp"` the ftag will be &&examp
# ended specifies how the HTML tag is ended
# `ended[i] = 0` means no closing ftag (so no &&/examp)
@@ -218,15 +217,15 @@ function presentationSubstitute(ind) {
gsub(cpat[ind], crep[ind])
}
-nopresentation == 0 && /<code>/ {
+/<code>/ {
presInsideCode = 1
}
-nopresentation == 0 && /<\/code>/ {
+/<\/code>/ {
presInsideCode = 0
}
-nopresentation == 0 && presInsideCode == 0 && /^[ \t]*(<p>)?&#38;&#38;/ {
+presInsideCode == 0 && /^[ \t]*(<p>)?&#38;&#38;/ {
for (i = 1; i <= nameslength; i++) {
if (index($0, names[i]) != 0)
presentationSubstitute(i)