mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
handle section (9p)
This commit is contained in:
parent
a192c1406c
commit
b50e9caf31
1 changed files with 4 additions and 1 deletions
|
@ -610,7 +610,7 @@ xcmd(Biobuf *b)
|
||||||
if(nfld==6 && strcmp(fld[2], "manref")==0){
|
if(nfld==6 && strcmp(fld[2], "manref")==0){
|
||||||
/* was the right macro; is it the right form? */
|
/* was the right macro; is it the right form? */
|
||||||
if(strlen(fld[5])>=3 &&
|
if(strlen(fld[5])>=3 &&
|
||||||
fld[5][0]=='(' && fld[5][2]==')' &&
|
fld[5][0]=='('/*)*/ && (fld[5][2]==/*(*/')' || (isalpha((uchar)fld[5][2]) && fld[5][3]==/*(*/')')) &&
|
||||||
'0'<=fld[5][1] && fld[5][1]<='9'){
|
'0'<=fld[5][1] && fld[5][1]<='9'){
|
||||||
if(strcmp(fld[3], "start") == 0){
|
if(strcmp(fld[3], "start") == 0){
|
||||||
/* set anchor attribute and remember string */
|
/* set anchor attribute and remember string */
|
||||||
|
@ -622,6 +622,9 @@ xcmd(Biobuf *b)
|
||||||
#else
|
#else
|
||||||
snprint(buf, sizeof buf,
|
snprint(buf, sizeof buf,
|
||||||
"<a href=\"../man%c/%s.html\">", fld[5][1], fld[4]);
|
"<a href=\"../man%c/%s.html\">", fld[5][1], fld[4]);
|
||||||
|
for(p=buf; *p; p++)
|
||||||
|
if('A' <= *p && *p <= 'Z')
|
||||||
|
*p += 'a'-'A';
|
||||||
#endif
|
#endif
|
||||||
nanchors++;
|
nanchors++;
|
||||||
anchors = erealloc(anchors, nanchors*sizeof(char*));
|
anchors = erealloc(anchors, nanchors*sizeof(char*));
|
||||||
|
|
Loading…
Reference in a new issue