diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2020-10-30 13:24:33 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2020-10-30 13:24:33 +0000 |
commit | ab2f6c60c5f4df11932fc29813f3e4a25c7b73d9 (patch) | |
tree | 2c13d2b2ee4241a609113f7b24d7f2d3833c2e63 | |
parent | baaf3b1f02982c3c4af6d22abfb4c94e4f0e827a (diff) | |
download | mandoc-ab2f6c60c5f4df11932fc29813f3e4a25c7b73d9.tar.gz mandoc-ab2f6c60c5f4df11932fc29813f3e4a25c7b73d9.tar.zst mandoc-ab2f6c60c5f4df11932fc29813f3e4a25c7b73d9.zip |
Promote section headers that can can be used unmodified as fragment
identifiers from TAG_WEAK to TAG_STRONG,
such that for example ...#DESCRIPTION always works.
Suggested by Aman Verma on the discuss@ list.
-rw-r--r-- | man_validate.c | 4 | ||||
-rw-r--r-- | mdoc_validate.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/man_validate.c b/man_validate.c index 2069fadc..57f05b25 100644 --- a/man_validate.c +++ b/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.154 2020/04/24 12:02:33 schwarze Exp $ */ +/* $Id: man_validate.c,v 1.155 2020/10/30 13:24:33 schwarze Exp $ */ /* * Copyright (c) 2010, 2012-2020 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> @@ -324,7 +324,7 @@ post_SH(CHKARGS) *cp = '_'; if (nc != NULL && nc->type == ROFFT_TEXT && strcmp(nc->string, tag) == 0) - tag_put(NULL, TAG_WEAK, n); + tag_put(NULL, TAG_STRONG, n); else tag_put(tag, TAG_FALLBACK, n); free(tag); diff --git a/mdoc_validate.c b/mdoc_validate.c index 51a4dfa3..3dc4a6f1 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.387 2020/04/26 21:41:07 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.388 2020/10/30 13:24:33 schwarze Exp $ */ /* * Copyright (c) 2010-2020 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> @@ -2617,7 +2617,7 @@ post_section(POST_ARGS) if ((nch = n->child) != NULL && nch->type == ROFFT_TEXT && strcmp(nch->string, tag) == 0) - tag_put(NULL, TAG_WEAK, n); + tag_put(NULL, TAG_STRONG, n); else tag_put(tag, TAG_FALLBACK, n); free(tag); |