diff options
| Commit | 2e75d5eba206fd739200f3e5b59c1472a152157e (patch) | |
|---|---|---|
| Author | 2024-07-21 16:05:11 +0300 | |
| Committer | 2024-07-21 16:05:11 +0300 | |
| Files | f459dd24a6e772350d96f1226c041c8732b845d9 /single.awk | |
| csg-2e75d5eba206fd739200f3e5b59c1472a152157e.tar csg-2e75d5eba206fd739200f3e5b59c1472a152157e.tar.gz csg-2e75d5eba206fd739200f3e5b59c1472a152157e.zip | ||
| Parent | f1527c325ccdad2b664c95614a9c7d7b08b08f7c (diff) | |
(single) Fixed anchors causing inifinite loop
1 files changed, 3 insertions, 2 deletions
| -rw-r--r-- | single.awk | 5 |
@@ -177,11 +177,12 @@ blankline { # Links /\[[^\]]*\]\([^)]*\)/ { while (match($0, /\[[^\]]*\]\(/)) { - astart = RSTART + RLENGTH - 1 ## astart = indexof("(") + astart = RSTART ## astart = indexof("[") inner_anchor = substr($0, RSTART + 1, RLENGTH - 3) ## ...[xxxxx](...)... + aend = RSTART + RLENGTH - 1 match(substr($0, astart), /\]\([^)]*)/) - aend += RLENGTH - 2 ## astart = indexof(")") + aend += RLENGTH - 2 ## aend = indexof(")") href = substr($0, astart + RSTART + 1, RLENGTH - 3) ## ...[...](xxxxx)... title = "" |
