Move all awk functions to separate files
This commit is contained in:
9
awk/indented_code.awk
Normal file
9
awk/indented_code.awk
Normal file
@@ -0,0 +1,9 @@
|
||||
BEGIN { in_code = 0 }
|
||||
/^ | / {
|
||||
if (!in_code) { print "<pre><code>"; in_code = 1 }
|
||||
sub(/^ | /, "", $0)
|
||||
gsub(/&/, "&"); gsub(/</, "<"); gsub(/>/, ">")
|
||||
print; next
|
||||
}
|
||||
{ if (in_code) { print "</code></pre>"; in_code = 0 } print }
|
||||
END { if (in_code) print "</code></pre>" }
|
||||
Reference in New Issue
Block a user