Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
1 files changed, 4 insertions, 3 deletions
-rw-r--r--single.awk7
diff --git a/single.awk b/single.awk
index 69c9f32..ab207a1 100644
--- a/single.awk
+++ b/single.awk
@@ -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)) {