shithub: riscv

Download patch

ref: 120412a6a2bddf3ae01f4e10bb4173021e802a84
parent: 72679fd6ccc72d993309a256030d89ee5e21102b
author: cinap_lenrek <[email protected]>
date: Sun Nov 4 22:16:13 EST 2012

wikifmt: fix trailing _ in heading name reference

--- a/sys/src/cmd/aux/wikifmt.c
+++ b/sys/src/cmd/aux/wikifmt.c
@@ -185,7 +185,8 @@
 	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')