wikifmt: more complete title to name= anchor translation
This commit is contained in:
parent
684cf70857
commit
98c6d867fd
1 changed files with 12 additions and 2 deletions
|
@ -190,10 +190,20 @@ heading(void)
|
||||||
if((*pos >= 'a' && *pos <= 'z')
|
if((*pos >= 'a' && *pos <= 'z')
|
||||||
|| (*pos >= 'A' && *pos <= 'Z')
|
|| (*pos >= 'A' && *pos <= 'Z')
|
||||||
|| (*pos >= '0' && *pos <= '9')
|
|| (*pos >= '0' && *pos <= '9')
|
||||||
|| (*pos == '-'))
|
|| (strchr("!#$%&()_+,-./{|}~:;=?@[\\]^_`", *pos) != 0))
|
||||||
output(pos, 1);
|
output(pos, 1);
|
||||||
else
|
else if(*pos == ' ' || *pos == '\t')
|
||||||
output("_", 1);
|
output("_", 1);
|
||||||
|
else if(*pos == '<')
|
||||||
|
output("<", 4);
|
||||||
|
else if(*pos == '>')
|
||||||
|
output(">", 4);
|
||||||
|
else if(*pos == '&')
|
||||||
|
output("&", 5);
|
||||||
|
else if(*pos == '"')
|
||||||
|
output(""", 6);
|
||||||
|
else if(*pos == '\'')
|
||||||
|
output("'", 5);
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
string("\"></a>");
|
string("\"></a>");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue