version 1.269, 2020/04/19 15:16:56 |
version 1.271, 2020/10/16 17:22:43 |
Line 81 static const struct htmldata htmltags[TAG_MAX] = { |
|
Line 81 static const struct htmldata htmltags[TAG_MAX] = { |
|
{"h1", HTML_TOPHRASE | HTML_NLAROUND}, |
{"h1", HTML_TOPHRASE | HTML_NLAROUND}, |
{"h2", HTML_TOPHRASE | HTML_NLAROUND}, |
{"h2", HTML_TOPHRASE | HTML_NLAROUND}, |
{"p", HTML_TOPHRASE | HTML_NLAROUND | HTML_INDENT}, |
{"p", HTML_TOPHRASE | HTML_NLAROUND | HTML_INDENT}, |
{"pre", HTML_TOPHRASE | HTML_NLALL | HTML_NOINDENT}, |
{"pre", HTML_TOPHRASE | HTML_NLAROUND | HTML_NOINDENT}, |
{"a", HTML_INPHRASE | HTML_TOPHRASE}, |
{"a", HTML_INPHRASE | HTML_TOPHRASE}, |
{"b", HTML_INPHRASE | HTML_TOPHRASE}, |
{"b", HTML_INPHRASE | HTML_TOPHRASE}, |
{"cite", HTML_INPHRASE | HTML_TOPHRASE}, |
{"cite", HTML_INPHRASE | HTML_TOPHRASE}, |
Line 383 html_make_id(const struct roff_node *n, int unique) |
|
Line 383 html_make_id(const struct roff_node *n, int unique) |
|
* permitted in URL-fragment strings according to the |
* permitted in URL-fragment strings according to the |
* explicit list at: |
* explicit list at: |
* https://url.spec.whatwg.org/#url-fragment-string |
* https://url.spec.whatwg.org/#url-fragment-string |
|
* 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 (isalnum((unsigned char)*cp) == 0 && |
strchr("!$&'()*+,-./:;=?@_~", *cp) == NULL) |
strchr("!$&'()*+,-./:;=?@_", *cp) == NULL) |
*cp = '_'; |
*cp = '_'; |
|
|
if (unique == 0) |
if (unique == 0) |
Line 407 html_make_id(const struct roff_node *n, int unique) |
|
Line 408 html_make_id(const struct roff_node *n, int unique) |
|
|
|
if (entry->ord > 1) { |
if (entry->ord > 1) { |
cp = buf; |
cp = buf; |
mandoc_asprintf(&buf, "%s_%d", cp, entry->ord); |
mandoc_asprintf(&buf, "%s~%d", cp, entry->ord); |
free(cp); |
free(cp); |
} |
} |
return buf; |
return buf; |