summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Schafft <lion@lion.leolix.org>2012-10-25 21:31:27 +0000
committerPhilipp Schafft <lion@lion.leolix.org>2017-03-27 02:09:43 +0000
commit943eb40fde5d5d68c6a5e7e65f4e57e7d7426442 (patch)
treec0f7be96dc2ba1751cae8eca1c7a38a04c717d18
parent6377ff5b8bced64bc6cc5c79562cee11058e410f (diff)
updated webgen so it also handles <a href="+page#hash"> correctly
-rwxr-xr-xwebgen4
1 files changed, 2 insertions, 2 deletions
diff --git a/webgen b/webgen
index 8fc72a0..c20506d 100755
--- a/webgen
+++ b/webgen
@@ -132,8 +132,8 @@ proc_page() {
cat -- -$END
} | \
sed "$SECTIONS_REGEX" | \
- sed 's#href="[+~]\([^"]*\)"#href="\1'"$PAGE_SUFFIX"'"#g' > $OF
-# perl -pe's#href="\+(.+?)"#href="$1'"$PAGE_SUFFIX"'"#g' > $OF
+ sed 's#href="[+~]\([^"\#]*\)\(\#*[^"]*\)"#href="\1'"$PAGE_SUFFIX"'\2"#g' > $OF
+# perl -pe's#href="\+(.+?)((?:#.+?)?)"#href="$1'"$PAGE_SUFFIX"'$2"#g' > $OF
}
for i in +$TEMPLATES_PAGE \~$TEMPLATES_DYN