From ab2f6c60c5f4df11932fc29813f3e4a25c7b73d9 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 30 Oct 2020 13:24:33 +0000 Subject: 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. --- man_validate.c | 4 ++-- 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 * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons @@ -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 * Copyright (c) 2008-2012 Kristaps Dzonsons @@ -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); -- cgit v1.2.3-56-ge451