remove spaces from hyperref identifiers instead using __
authorChristian Thaeter <ct@pipapo.org>
Mon, 16 Aug 2010 23:48:23 +0000 (01:48 +0200)
committerChristian Thaeter <ct@pipapo.org>
Mon, 16 Aug 2010 23:48:23 +0000 (01:48 +0200)
doc/asciidoc.pawk

index 07ee99c..d8de3df 100644 (file)
@@ -16,7 +16,7 @@ match($0, com"(.*) PARA (.*); *(.*); *(.*)", p) {
     {
         if (p[4])
         {
-            gsub(/[^[:alnum:]_]+/, "__", p[3])
+            gsub(/[^[:alnum:]_]+/, "", p[3])
             append("index", tolower(p[3]), "xref:"p[3]"["p[2]"]:: "p[4])
         }
         append(p[1],"","[["p[3]"]]")
@@ -65,7 +65,7 @@ match($0, com"(.*) HEAD([^ ]+) (.*); *(.*); *(.*)", p) {
         append(p[1],"",gensub(/./, p[2], "g", p[3]))
         if (p[4])
         {
-            gsub(/[^[:alnum:]_]+/, "__", p[4])
+            gsub(/[^[:alnum:]_]+/, "", p[4])
             if (p[5]) append("index", tolower(p[4]), "xref:"p[4]"["p[3]"]:: "p[5])
             append(p[1],"","[["p[4]"]]")
         }
@@ -79,7 +79,7 @@ match($0, com"(.*) HEAD([^ ]+) (.*); *(.*); *(.*)", p) {
 match($0, com"(.*) INDEX (.*); (.*); (.*)", p) {
     if (p[4])
     {
-        gsub(/[^[:alnum:]_]+/, "__", p[3])
+        gsub(/[^[:alnum:]_]+/, "", p[3])
         append("index", tolower(p[3]), "xref:"p[3]"["p[2]"]:: "p[4])
     }
     append(p[1],"","[["p[3]"]]")