Summary Files Commits Branches @commit @diff @stats
path: root / awk-edits / Presentation.awk
diff options
context:
space:
mode:
Commit3552c3e6cb666ac3f063652862e3b287cd30c904 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-10-23 15:34:14 +0300
Committer
 Syndamia <kamen@syndamia.com>
2023-10-23 15:34:14 +0300
Filesedde566ff9d0d35643cf1f86c9ffef5287000c9a /awk-edits/Presentation.awk
syndamia.com-3552c3e6cb666ac3f063652862e3b287cd30c904.tar
syndamia.com-3552c3e6cb666ac3f063652862e3b287cd30c904.tar.gz
syndamia.com-3552c3e6cb666ac3f063652862e3b287cd30c904.zip
Parent15b153225ef24e37348220505aa0e8aa221f415b (diff)
[generate] Reworked to use csg, updated awk scripts with csg in mind and updated info in _header
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)