]> git.lizzy.rs Git - plan9front.git/commitdiff
wikifmt: fix trailing _ in heading name reference
authorcinap_lenrek <cinap_lenrek@gmx.de>
Mon, 5 Nov 2012 02:16:13 +0000 (03:16 +0100)
committercinap_lenrek <cinap_lenrek@gmx.de>
Mon, 5 Nov 2012 02:16:13 +0000 (03:16 +0100)
sys/src/cmd/aux/wikifmt.c

index 80cd53f1be8ffbf6dc45b8237015b3f142e91921..a28e5e2d6444a83d44f994c82b1e837df3df2526 100644 (file)
@@ -185,7 +185,8 @@ heading(void)
        output("0123456"+n, 1);
        string("><a name=\"");
        o = pos;
-       while(pos < e){
+       s = trimback(e);
+       while(pos < s){
                if((*pos >= 'a' && *pos <= 'z')
                || (*pos >= 'A' && *pos <= 'Z')
                || (*pos >= '0' && *pos <= '9')