Skip to content

Commit

Permalink
special symbols in code...
Browse files Browse the repository at this point in the history
  • Loading branch information
flammie committed Jun 19, 2024
1 parent a9652d9 commit 4db9bbb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions scripts/doccomments2ghpages-vislcg.awk
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,16 @@ function expand_variables(s) {
printf("This construct is not supported anymore:\n `{%s`} ", $0);
}
/^[^#].*#!!= / {
CODE=gensub("#!!=.*", "", 1);
print(expand_variables(gensub(".*#!!= ", "", 1)));
CODE=gensub("&", "@AMP;", "g", gensub("#!!=.*", "", 1));
print(gensub("@AMP;", "\\&", "g",
expand_variables(gensub(".*#!!= ", "", 1))));
}
/^[^#].*#!!≈ / {
CODE=gensub("[ \t][ \t]*", " ", "g",
CODE=gensub("&", "@AMP;" ,"g", gensub("[ \t][ \t]*", " ", "g",
gensub("^[ \t]*", "", 1,
gensub("[ \t]*#!!≈.*", "", 1)));
print(expand_variables(gensub(".*#!!≈ ", "", 1)));
gensub("[ \t]*#!!≈.*", "", 1))));
print(gensub("@AMP;", "\\&", "g",
expand_variables(gensub(".*#!!≈ ", "", 1))));
}
/^#!! / {print(expand_variables(gensub(".*#!! *", "", 1))); }
/^[^#]+#!! / {print(expand_variables(gensub(".*#!! *", "", 1))); }
Expand Down

0 comments on commit 4db9bbb

Please sign in to comment.