diff options
1 files changed, 4 insertions, 3 deletions
| -rw-r--r-- | single.awk | 7 |
@@ -56,6 +56,10 @@ function _next() { next } +function sub_match(replacement) { + $0 = substr($0, 1, RSTART - 1) replacement substr($0, RSTART + RLENGTH) +} + function char(string, ind) { if (1 > ind || ind > length(string)) { return ""; @@ -205,9 +209,6 @@ inside_codeblock && ! /^[ \t]*$/ { } # Emphasis -function sub_match(replacement) { - $0 = substr($0, 1, RSTART - 1) replacement substr($0, RSTART + RLENGTH) -} function surround(brace, left, right, blen) { if (blen == "") { blen = length(brace) } if (match($0, brace (brace == "``" ? "." : "[^" brace "]") "+" brace)) { |
