Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
Commit76971f093f3e2990dda2daadfe78f98994758c06 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-12-31 19:38:26 +0200
Committer
 Syndamia <kamen@syndamia.com>
2024-12-31 19:38:26 +0200
Files4b99cde1db09bdd3905f92780c8bd272991e118c /single.awk
csg-76971f093f3e2990dda2daadfe78f98994758c06.tar
csg-76971f093f3e2990dda2daadfe78f98994758c06.tar.gz
csg-76971f093f3e2990dda2daadfe78f98994758c06.zip
Parent672d531cc0b945b25ae00674fcaa75987243d945 (diff)
chore(single): Move sub_match function definition to the top
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)) {