version 1.278, 2022/07/06 14:34:59 |
version 1.279, 2022/08/09 11:23:11 |
Line 403 html_make_id(const struct roff_node *n, int unique) |
|
Line 403 html_make_id(const struct roff_node *n, int unique) |
|
* In addition, reserve '~' for ordinal suffixes. |
* In addition, reserve '~' for ordinal suffixes. |
*/ |
*/ |
|
|
for (cp = buf; *cp != '\0'; cp++) |
for (cp = buf; *cp != '\0'; cp++) { |
if (isalnum((unsigned char)*cp) == 0 && |
if (*cp == ASCII_HYPH) |
|
*cp = '-'; |
|
else if (isalnum((unsigned char)*cp) == 0 && |
strchr("!$&'()*+,-./:;=?@_", *cp) == NULL) |
strchr("!$&'()*+,-./:;=?@_", *cp) == NULL) |
*cp = '_'; |
*cp = '_'; |
|
} |
|
|
if (unique == 0) |
if (unique == 0) |
return buf; |
return buf; |