diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-06-03 01:07:09 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-06-03 01:07:09 +1200 |
commit | 50a5b0d2235b3d2a1d3355832fc21e3bc180aa19 (patch) | |
tree | b5dd4837b5e613604d2c4d5dea76750d87ef4480 /bin | |
parent | Update submodules (diff) | |
download | dotfiles-50a5b0d2235b3d2a1d3355832fc21e3bc180aa19.tar.gz dotfiles-50a5b0d2235b3d2a1d3355832fc21e3bc180aa19.zip |
Check presence of delimiters correctly
Diffstat (limited to 'bin')
-rw-r--r-- | bin/mi5.awk | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/mi5.awk b/bin/mi5.awk index 27974274..0bcc1930 100644 --- a/bin/mi5.awk +++ b/bin/mi5.awk @@ -38,10 +38,9 @@ mac && NF { dst = "" # As long as there's a pair of opening and closing tags - while (index(src,open)) { + while (ind = index(src, open) && index(src, shut) > ind) { # Read up to opening tag into seg, shift from src - ind = index(src, open) seg = substr(src, 1, ind - 1) src = substr(src, ind) |