From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 23232 invoked from network); 6 Apr 2020 10:16:59 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with UTF8ESMTPZ; 6 Apr 2020 10:16:59 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id ab4a9271 for ; Mon, 6 Apr 2020 05:16:56 -0500 (EST) Received: from localhost (mandoc.bsd.lv [local]) by mandoc.bsd.lv (OpenSMTPD) with ESMTPA id 765c356c for ; Mon, 6 Apr 2020 05:16:55 -0500 (EST) Date: Mon, 6 Apr 2020 05:16:55 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: Support manual tagging of .Pp, .Bd, .D1, .Dl, .Bl, and .It. X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-ID: <11ff39aef083399e@mandoc.bsd.lv> Log Message: ----------- Support manual tagging of .Pp, .Bd, .D1, .Dl, .Bl, and .It. In HTML output, improve the logic for writing inside permalinks: skip them when there is no child content or when there is a risk that the children might contain flow content. Modified Files: -------------- mandoc: html.c mdoc.c mdoc_html.c mdoc_term.c mdoc_validate.c roff.c roff.h mandoc/regress/mdoc/Bd: Makefile nested.in nested.out_ascii nested.out_lint nested.out_markdown paragraph.in paragraph.out_ascii paragraph.out_html paragraph.out_markdown mandoc/regress/mdoc/D1: Makefile spacing.in spacing.out_ascii spacing.out_html spacing.out_lint spacing.out_markdown mandoc/regress/mdoc/Dl: Makefile spacing.in spacing.out_ascii spacing.out_lint spacing.out_markdown mandoc/regress/mdoc/Pp: Makefile arg.in arg.out_ascii arg.out_lint arg.out_markdown mandoc/regress/mdoc/Tg: Makefile Added Files: ----------- mandoc/regress/mdoc/Bd: nested.out_tag paragraph.out_tag mandoc/regress/mdoc/D1: spacing.out_tag mandoc/regress/mdoc/Dl: spacing.out_tag mandoc/regress/mdoc/Pp: arg.out_tag mandoc/regress/mdoc/Tg: column.in column.out_ascii column.out_html column.out_markdown column.out_tag list.in list.out_ascii list.out_html list.out_markdown list.out_tag Revision Data ------------- Index: Makefile =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Pp/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -Lregress/mdoc/Pp/Makefile -Lregress/mdoc/Pp/Makefile -u -p -r1.3 -r1.4 --- regress/mdoc/Pp/Makefile +++ regress/mdoc/Pp/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.4 2015/02/04 19:11:17 schwarze Exp $ +# $OpenBSD: Makefile,v 1.7 2020/04/06 09:55:50 schwarze Exp $ REGRESS_TARGETS = arg +TAG_TARGETS = arg LINT_TARGETS = arg .include Index: arg.out_ascii =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Pp/arg.out_ascii,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Pp/arg.out_ascii -Lregress/mdoc/Pp/arg.out_ascii -u -p -r1.2 -r1.3 --- regress/mdoc/Pp/arg.out_ascii +++ regress/mdoc/Pp/arg.out_ascii @@ -11,4 +11,6 @@ DDEESSCCRRIIPPTTIIOONN line 4 -OpenBSD July 4, 2017 OpenBSD + final text + +OpenBSD April 6, 2020 OpenBSD --- /dev/null +++ regress/mdoc/Pp/arg.out_tag @@ -0,0 +1,4 @@ +NAME 3 +DESCRIPTION 6 +first 9 +last 14 Index: arg.out_markdown =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Pp/arg.out_markdown,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Pp/arg.out_markdown -Lregress/mdoc/Pp/arg.out_markdown -u -p -r1.2 -r1.3 --- regress/mdoc/Pp/arg.out_markdown +++ regress/mdoc/Pp/arg.out_markdown @@ -13,4 +13,6 @@ line 3 line 4 -OpenBSD - July 4, 2017 +final text + +OpenBSD - April 6, 2020 Index: arg.in =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Pp/arg.in,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Pp/arg.in -Lregress/mdoc/Pp/arg.in -u -p -r1.2 -r1.3 --- regress/mdoc/Pp/arg.in +++ regress/mdoc/Pp/arg.in @@ -1,4 +1,4 @@ -.\" $OpenBSD: arg.in,v 1.4 2017/07/04 14:53:26 schwarze Exp $ +.\" $OpenBSD: arg.in,v 1.5 2020/04/06 09:55:50 schwarze Exp $ .Dd $Mdocdate$ .Dt PP-ARG 1 .Os @@ -7,9 +7,13 @@ .Nd paragraph macro with arguments .Sh DESCRIPTION line 1 +.Tg first .Pp drop this line 2 .br drop this line 3 .sp 1v drop this line 4 +.Tg last +.Pp +final text Index: arg.out_lint =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Pp/arg.out_lint,v retrieving revision 1.7 retrieving revision 1.8 diff -Lregress/mdoc/Pp/arg.out_lint -Lregress/mdoc/Pp/arg.out_lint -u -p -r1.7 -r1.8 --- regress/mdoc/Pp/arg.out_lint +++ regress/mdoc/Pp/arg.out_lint @@ -1,3 +1,3 @@ -mandoc: arg.in:12:5: ERROR: skipping all arguments: br drop this -mandoc: arg.in:14:8: ERROR: skipping excess arguments: sp ... drop this -mandoc: arg.in:10:2: ERROR: skipping all arguments: Pp drop +mandoc: arg.in:13:5: ERROR: skipping all arguments: br drop this +mandoc: arg.in:15:8: ERROR: skipping excess arguments: sp ... drop this +mandoc: arg.in:11:2: ERROR: skipping all arguments: Pp drop Index: mdoc_term.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_term.c,v retrieving revision 1.379 retrieving revision 1.380 diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.379 -r1.380 --- mdoc_term.c +++ mdoc_term.c @@ -335,7 +335,8 @@ print_mdoc_node(DECL_ARGS) memset(&npair, 0, sizeof(struct termpair)); npair.ppair = pair; - if (n->flags & NODE_ID) + if (n->flags & NODE_ID && n->tok != MDOC_Pp && + (n->tok != MDOC_It || n->type != ROFFT_BLOCK)) term_tag_write(n, p->line); /* @@ -630,6 +631,8 @@ termp_it_pre(DECL_ARGS) if (n->type == ROFFT_BLOCK) { print_bvspace(p, n->parent->parent, n); + if (n->flags & NODE_ID) + term_tag_write(n, p->line); return 1; } @@ -1110,7 +1113,6 @@ termp_ex_pre(DECL_ARGS) static int termp_nd_pre(DECL_ARGS) { - if (n->type == ROFFT_BODY) term_word(p, "\\(en"); return 1; @@ -1119,14 +1121,20 @@ termp_nd_pre(DECL_ARGS) static int termp_bl_pre(DECL_ARGS) { - - return n->type != ROFFT_HEAD; + switch (n->type) { + case ROFFT_BLOCK: + term_newln(p); + return 1; + case ROFFT_HEAD: + return 0; + default: + return 1; + } } static void termp_bl_post(DECL_ARGS) { - if (n->type != ROFFT_BLOCK) return; term_newln(p); @@ -1140,7 +1148,6 @@ termp_bl_post(DECL_ARGS) static int termp_xr_pre(DECL_ARGS) { - if (NULL == (n = n->child)) return 0; @@ -1555,6 +1562,8 @@ static int termp_pp_pre(DECL_ARGS) { term_vspace(p); + if (n->flags & NODE_ID) + term_tag_write(n, p->line); return 0; } Index: roff.h =================================================================== RCS file: /home/cvs/mandoc/mandoc/roff.h,v retrieving revision 1.72 retrieving revision 1.73 diff -Lroff.h -Lroff.h -u -p -r1.72 -r1.73 --- roff.h +++ roff.h @@ -1,7 +1,7 @@ -/* $Id$ */ +/* $Id$ */ /* - * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2013-2015, 2017-2020 Ingo Schwarze + * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -557,3 +557,4 @@ struct roff_node *roff_node_child(struct struct roff_node *roff_node_next(struct roff_node *); struct roff_node *roff_node_prev(struct roff_node *); int roff_node_transparent(struct roff_node *); +int roff_tok_transparent(enum roff_tok); Index: roff.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/roff.c,v retrieving revision 1.372 retrieving revision 1.373 diff -Lroff.c -Lroff.c -u -p -r1.372 -r1.373 --- roff.c +++ roff.c @@ -1123,7 +1123,13 @@ roff_node_transparent(struct roff_node * return 0; if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) return 1; - switch (n->tok) { + return roff_tok_transparent(n->tok); +} + +int +roff_tok_transparent(enum roff_tok tok) +{ + switch (tok) { case ROFF_ft: case ROFF_ll: case ROFF_mc: Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_html.c,v retrieving revision 1.337 retrieving revision 1.338 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.337 -r1.338 --- mdoc_html.c +++ mdoc_html.c @@ -741,7 +741,7 @@ mdoc_it_pre(MDOC_ARGS) case ROFFT_HEAD: return 0; case ROFFT_BODY: - print_otag(h, TAG_LI, ""); + print_otag_id(h, TAG_LI, NULL, n); break; default: break; @@ -753,7 +753,7 @@ mdoc_it_pre(MDOC_ARGS) case LIST_ohang: switch (n->type) { case ROFFT_HEAD: - print_otag(h, TAG_DT, ""); + print_otag_id(h, TAG_DT, NULL, n); break; case ROFFT_BODY: print_otag(h, TAG_DD, ""); @@ -765,7 +765,7 @@ mdoc_it_pre(MDOC_ARGS) case LIST_tag: switch (n->type) { case ROFFT_HEAD: - print_otag(h, TAG_DT, ""); + print_otag_id(h, TAG_DT, NULL, n); break; case ROFFT_BODY: if (n->child == NULL) { @@ -786,7 +786,7 @@ mdoc_it_pre(MDOC_ARGS) print_otag(h, TAG_TD, ""); break; default: - print_otag(h, TAG_TR, ""); + print_otag_id(h, TAG_TR, NULL, n); } default: break; @@ -852,8 +852,8 @@ mdoc_bl_pre(MDOC_ARGS) case LIST_tag: if (bl->offs) print_otag(h, TAG_DIV, "c", "Bd-indent"); - print_otag(h, TAG_DL, "c", bl->comp ? - "Bl-tag Bl-compact" : "Bl-tag"); + print_otag_id(h, TAG_DL, + bl->comp ? "Bl-tag Bl-compact" : "Bl-tag", n->body); return 1; case LIST_column: elemtype = TAG_TABLE; @@ -866,7 +866,7 @@ mdoc_bl_pre(MDOC_ARGS) (void)strlcat(cattr, " Bd-indent", sizeof(cattr)); if (bl->comp) (void)strlcat(cattr, " Bl-compact", sizeof(cattr)); - print_otag(h, elemtype, "c", cattr); + print_otag_id(h, elemtype, cattr, n->body); return 1; } @@ -898,15 +898,15 @@ mdoc_d1_pre(MDOC_ARGS) switch (n->type) { case ROFFT_BLOCK: html_close_paragraph(h); - break; + return 1; case ROFFT_HEAD: return 0; case ROFFT_BODY: - return 1; + break; default: abort(); } - print_otag(h, TAG_DIV, "c", "Bd Bd-indent"); + print_otag_id(h, TAG_DIV, "Bd Bd-indent", n); if (n->tok == MDOC_Dl) print_otag(h, TAG_CODE, "c", "Li"); return 1; @@ -963,7 +963,7 @@ mdoc_bd_pre(MDOC_ARGS) strcmp(n->norm->Bd.offs, "left") != 0) (void)strlcat(buf, " Bd-indent", sizeof(buf)); - print_otag(h, TAG_DIV, "c", buf); + print_otag_id(h, TAG_DIV, buf, n); return 1; } @@ -1210,11 +1210,16 @@ mdoc_pp_pre(MDOC_ARGS) { if (n->flags & NODE_NOFILL) { print_endline(h); - h->col = 1; - print_endline(h); + if (n->flags & NODE_ID) + mdoc_tg_pre(meta, n, h); + else { + h->col = 1; + print_endline(h); + } } else { html_close_paragraph(h); - print_otag(h, TAG_P, "c", "Pp"); + print_otag(h, TAG_P, "ci", "Pp", + n->flags & NODE_ID ? html_make_id(n, 1) : NULL); } return 0; } Index: mdoc_validate.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc_validate.c,v retrieving revision 1.382 retrieving revision 1.383 diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.382 -r1.383 --- mdoc_validate.c +++ mdoc_validate.c @@ -1105,6 +1105,7 @@ post_tg(POST_ARGS) struct roff_node *n; /* The .Tg node. */ struct roff_node *nch; /* The first child of the .Tg node. */ struct roff_node *nn; /* The next node after the .Tg node. */ + struct roff_node *np; /* The parent of the next node. */ struct roff_node *nt; /* The TEXT node containing the tag. */ size_t len; /* The number of bytes in the tag. */ @@ -1150,7 +1151,7 @@ post_tg(POST_ARGS) } /* By default, tag the .Tg node itself. */ - if (nn == NULL) + if (nn == NULL || nn->flags & NODE_ID) nn = n; /* Explicit tagging of specific macros. */ @@ -1158,8 +1159,41 @@ post_tg(POST_ARGS) case MDOC_Sh: case MDOC_Ss: case MDOC_Fo: - nn = nn->head; - /* FALLTHROUGH */ + nn = nn->head->child == NULL ? n : nn->head; + break; + case MDOC_It: + np = nn->parent; + while (np->tok != MDOC_Bl) + np = np->parent; + switch (np->norm->Bl.type) { + case LIST_column: + break; + case LIST_diag: + case LIST_hang: + case LIST_inset: + case LIST_ohang: + case LIST_tag: + nn = nn->head; + break; + case LIST_bullet: + case LIST_dash: + case LIST_enum: + case LIST_hyphen: + case LIST_item: + nn = nn->body->child == NULL ? n : nn->body; + break; + default: + abort(); + } + break; + case MDOC_Bd: + case MDOC_Bl: + case MDOC_D1: + case MDOC_Dl: + nn = nn->body->child == NULL ? n : nn->body; + break; + case MDOC_Pp: + break; case MDOC_Cm: case MDOC_Dv: case MDOC_Em: @@ -1172,9 +1206,9 @@ post_tg(POST_ARGS) case MDOC_Ms: case MDOC_No: case MDOC_Sy: - if (nn->child != NULL && (nn->flags & NODE_ID) == 0) - break; - /* FALLTHROUGH */ + if (nn->child == NULL) + nn = n; + break; default: nn = n; break; Index: mdoc.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/mdoc.c,v retrieving revision 1.274 retrieving revision 1.275 diff -Lmdoc.c -Lmdoc.c -u -p -r1.274 -r1.275 --- mdoc.c +++ mdoc.c @@ -1,7 +1,7 @@ -/* $Id$ */ +/* $Id$ */ /* + * Copyright (c) 2010, 2012-2018, 2020 Ingo Schwarze * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2010, 2012-2018 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -14,6 +14,8 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Top level and utility functions of the mdoc(7) parser for mandoc(1). */ #include "config.h" @@ -352,12 +354,13 @@ mdoc_pmacro(struct roff_man *mdoc, int l mandoc_msg(MANDOCERR_SPACE_EOL, ln, offs - 1, NULL); /* - * If an initial macro or a list invocation, divert directly - * into macro processing. + * If an initial or transparent macro or a list invocation, + * divert directly into macro processing. */ n = mdoc->last; - if (n == NULL || tok == MDOC_It || tok == MDOC_El) { + if (n == NULL || tok == MDOC_It || tok == MDOC_El || + roff_tok_transparent(tok)) { (*mdoc_macro(tok)->fp)(mdoc, tok, ln, sv, &offs, buf); return 1; } Index: html.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/html.c,v retrieving revision 1.264 retrieving revision 1.265 diff -Lhtml.c -Lhtml.c -u -p -r1.264 -r1.265 --- html.c +++ html.c @@ -362,7 +362,7 @@ html_make_id(const struct roff_node *n, return NULL; break; default: - if (n->child->type != ROFFT_TEXT) + if (n->child == NULL || n->child->type != ROFFT_TEXT) return NULL; buf = mandoc_strdup(n->child->string); break; @@ -769,13 +769,15 @@ print_otag(struct html *h, enum htmltag /* * Print an element with an optional "id=" attribute. - * If there is an "id=" attribute, also add a permalink: - * outside if it's a phrasing element, or inside otherwise. + * If the element has phrasing content and an "id=" attribute, + * also add a permalink: outside if it can be in phrasing context, + * inside otherwise. */ struct tag * print_otag_id(struct html *h, enum htmltag elemtype, const char *cattr, struct roff_node *n) { + struct roff_node *nch; struct tag *ret, *t; const char *id; @@ -788,8 +790,17 @@ print_otag_id(struct html *h, enum htmlt t = print_otag(h, elemtype, "ci", cattr, id); if (ret == NULL) { ret = t; - if (id != NULL) - print_otag(h, TAG_A, "chR", "permalink", id); + if (id != NULL && (nch = n->child) != NULL) { + /* man(7) is safe, it tags phrasing content only. */ + if (n->tok > MDOC_MAX || + htmltags[elemtype].flags & HTML_TOPHRASE) + nch = NULL; + else /* For mdoc(7), beware of nested blocks. */ + while (nch != NULL && nch->type == ROFFT_TEXT) + nch = nch->next; + if (nch == NULL) + print_otag(h, TAG_A, "chR", "permalink", id); + } } return ret; } Index: nested.out_lint =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/nested.out_lint,v retrieving revision 1.5 retrieving revision 1.6 diff -Lregress/mdoc/Bd/nested.out_lint -Lregress/mdoc/Bd/nested.out_lint -u -p -r1.5 -r1.6 --- regress/mdoc/Bd/nested.out_lint +++ regress/mdoc/Bd/nested.out_lint @@ -1,2 +1,2 @@ -mandoc: nested.in:14:2: WARNING: nested displays are not portable: Bd in Bd -mandoc: nested.in:25:2: WARNING: nested displays are not portable: Bd in Bd +mandoc: nested.in:16:2: WARNING: nested displays are not portable: Bd in Bd +mandoc: nested.in:29:2: WARNING: nested displays are not portable: Bd in Bd Index: nested.in =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/nested.in,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Bd/nested.in -Lregress/mdoc/Bd/nested.in -u -p -r1.2 -r1.3 --- regress/mdoc/Bd/nested.in +++ regress/mdoc/Bd/nested.in @@ -1,4 +1,4 @@ -.\" $OpenBSD: nested.in,v 1.2 2017/07/04 14:53:24 schwarze Exp $ +.\" $OpenBSD: nested.in,v 1.3 2020/04/06 09:55:49 schwarze Exp $ .Dd $Mdocdate$ .Dt BD-NESTED 1 .Os @@ -8,9 +8,11 @@ .Sh DESCRIPTION regular text +.Tg outer .Bd -ragged -offset indent outer text (default indent) +.Tg inner .Bd -ragged -offset indent inner text (default indent) @@ -20,8 +22,10 @@ text .Ed regular text +.Tg outer .Bd -ragged -offset 4n outer text (4n) +.Tg inner .Bd -ragged -offset 2n inner text (2n) .Ed Index: nested.out_markdown =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/nested.out_markdown,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Bd/nested.out_markdown -Lregress/mdoc/Bd/nested.out_markdown -u -p -r1.2 -r1.3 --- regress/mdoc/Bd/nested.out_markdown +++ regress/mdoc/Bd/nested.out_markdown @@ -43,4 +43,4 @@ tag > outer text -OpenBSD - July 4, 2017 +OpenBSD - April 6, 2020 --- /dev/null +++ regress/mdoc/Bd/nested.out_tag @@ -0,0 +1,6 @@ +NAME 3 +DESCRIPTION 6 +outer 9 +inner 11 +outer 15 +inner 17 Index: paragraph.out_ascii =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/paragraph.out_ascii,v retrieving revision 1.1 retrieving revision 1.2 diff -Lregress/mdoc/Bd/paragraph.out_ascii -Lregress/mdoc/Bd/paragraph.out_ascii -u -p -r1.1 -r1.2 --- regress/mdoc/Bd/paragraph.out_ascii +++ regress/mdoc/Bd/paragraph.out_ascii @@ -24,4 +24,4 @@ DDEESSCCRRIIPPTTIIOONN ENDTEST end of file -OpenBSD January 7, 2019 OpenBSD +OpenBSD April 6, 2020 OpenBSD Index: paragraph.out_markdown =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/paragraph.out_markdown,v retrieving revision 1.1 retrieving revision 1.2 diff -Lregress/mdoc/Bd/paragraph.out_markdown -Lregress/mdoc/Bd/paragraph.out_markdown -u -p -r1.1 -r1.2 --- regress/mdoc/Bd/paragraph.out_markdown +++ regress/mdoc/Bd/paragraph.out_markdown @@ -36,4 +36,4 @@ to normal ENDTEST end of file -OpenBSD - January 7, 2019 +OpenBSD - April 6, 2020 Index: nested.out_ascii =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/nested.out_ascii,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Bd/nested.out_ascii -Lregress/mdoc/Bd/nested.out_ascii -u -p -r1.2 -r1.3 --- regress/mdoc/Bd/nested.out_ascii +++ regress/mdoc/Bd/nested.out_ascii @@ -26,4 +26,4 @@ DDEESSCCRRIIPPTTIIOONN inner text (2n) outer text -OpenBSD July 4, 2017 OpenBSD +OpenBSD April 6, 2020 OpenBSD Index: paragraph.out_html =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/paragraph.out_html,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Bd/paragraph.out_html -Lregress/mdoc/Bd/paragraph.out_html -u -p -r1.2 -r1.3 --- regress/mdoc/Bd/paragraph.out_html +++ regress/mdoc/Bd/paragraph.out_html @@ -1,14 +1,14 @@ -

normal paragraph

-
filled display -

paragraph in display

+

normal paragraph

+
filled display +

paragraph in display

back to normal

another paragraph

-
+
 unfilled
 display
-
+
 unfilled
 paragraph
 
--- /dev/null +++ regress/mdoc/Bd/paragraph.out_tag @@ -0,0 +1,7 @@ +NAME 3 +DESCRIPTION 6 +npara 9 +filled 11 +fpara 13 +unfilled 18 +upara 21 Index: paragraph.in =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/paragraph.in,v retrieving revision 1.1 retrieving revision 1.2 diff -Lregress/mdoc/Bd/paragraph.in -Lregress/mdoc/Bd/paragraph.in -u -p -r1.1 -r1.2 --- regress/mdoc/Bd/paragraph.in +++ regress/mdoc/Bd/paragraph.in @@ -1,4 +1,4 @@ -.\" $OpenBSD: paragraph.in,v 1.1 2019/01/07 06:51:37 schwarze Exp $ +.\" $OpenBSD: paragraph.in,v 1.2 2020/04/06 09:55:49 schwarze Exp $ .Dd $Mdocdate$ .Dt BD-PARAGRAPH 1 .Os @@ -9,12 +9,15 @@ BEGINTEST initial text +.Tg npara .Pp normal paragraph +.Tg filled .Bd -filled filled display +.Tg fpara .Pp paragraph in display @@ -24,9 +27,11 @@ to normal .Pp another paragraph +.Tg unfilled .Bd -unfilled unfilled display +.Tg upara .Pp unfilled paragraph Index: Makefile =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Bd/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -Lregress/mdoc/Bd/Makefile -Lregress/mdoc/Bd/Makefile -u -p -r1.5 -r1.6 --- regress/mdoc/Bd/Makefile +++ regress/mdoc/Bd/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.22 2019/01/07 06:51:37 schwarze Exp $ +# $OpenBSD: Makefile,v 1.23 2020/04/06 09:55:49 schwarze Exp $ REGRESS_TARGETS = beforeNAME blank centered nested nf paragraph spacing REGRESS_TARGETS += badargs empty offset-empty offset-neg REGRESS_TARGETS += break broken unclosed +TAG_TARGETS = nested paragraph LINT_TARGETS = beforeNAME blank nested badargs break broken unclosed HTML_TARGETS = nf paragraph Index: spacing.out_html =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/D1/spacing.out_html,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/D1/spacing.out_html -Lregress/mdoc/D1/spacing.out_html -u -p -r1.2 -r1.3 --- regress/mdoc/D1/spacing.out_html +++ regress/mdoc/D1/spacing.out_html @@ -1,5 +1,7 @@

preceding paragraph

-
spacing in and around one-line displays
+ empty display:
following text --- /dev/null +++ regress/mdoc/D1/spacing.out_tag @@ -0,0 +1,3 @@ +NAME 3 +DESCRIPTION 6 +display 10 Index: spacing.out_lint =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/D1/spacing.out_lint,v retrieving revision 1.6 retrieving revision 1.7 diff -Lregress/mdoc/D1/spacing.out_lint -Lregress/mdoc/D1/spacing.out_lint -u -p -r1.6 -r1.7 --- regress/mdoc/D1/spacing.out_lint +++ regress/mdoc/D1/spacing.out_lint @@ -1 +1 @@ -mandoc: spacing.in:15:2: WARNING: empty block: D1 +mandoc: spacing.in:16:2: WARNING: empty block: D1 Index: spacing.out_markdown =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/D1/spacing.out_markdown,v retrieving revision 1.3 retrieving revision 1.4 diff -Lregress/mdoc/D1/spacing.out_markdown -Lregress/mdoc/D1/spacing.out_markdown -u -p -r1.3 -r1.4 --- regress/mdoc/D1/spacing.out_markdown +++ regress/mdoc/D1/spacing.out_markdown @@ -19,4 +19,4 @@ following text ENDTEST end of file -OpenBSD - January 7, 2019 +OpenBSD - April 6, 2020 Index: spacing.out_ascii =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/D1/spacing.out_ascii,v retrieving revision 1.3 retrieving revision 1.4 diff -Lregress/mdoc/D1/spacing.out_ascii -Lregress/mdoc/D1/spacing.out_ascii -u -p -r1.3 -r1.4 --- regress/mdoc/D1/spacing.out_ascii +++ regress/mdoc/D1/spacing.out_ascii @@ -13,4 +13,4 @@ DDEESSCCRRIIPPTTIIOONN ENDTEST end of file -OpenBSD January 7, 2019 OpenBSD +OpenBSD April 6, 2020 OpenBSD Index: spacing.in =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/D1/spacing.in,v retrieving revision 1.3 retrieving revision 1.4 diff -Lregress/mdoc/D1/spacing.in -Lregress/mdoc/D1/spacing.in -u -p -r1.3 -r1.4 --- regress/mdoc/D1/spacing.in +++ regress/mdoc/D1/spacing.in @@ -1,4 +1,4 @@ -.\" $OpenBSD: spacing.in,v 1.4 2019/01/07 06:51:37 schwarze Exp $ +.\" $OpenBSD: spacing.in,v 1.5 2020/04/06 09:55:49 schwarze Exp $ .Dd $Mdocdate$ .Dt D1-SPACING 1 .Os @@ -10,6 +10,7 @@ BEGINTEST .Pp preceding paragraph +.Tg display .D1 spacing in and around one-line displays empty display: .D1 Index: Makefile =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/D1/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -Lregress/mdoc/D1/Makefile -Lregress/mdoc/D1/Makefile -u -p -r1.4 -r1.5 --- regress/mdoc/D1/Makefile +++ regress/mdoc/D1/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.5 2019/01/07 06:51:37 schwarze Exp $ +# $OpenBSD: Makefile,v 1.6 2020/04/06 09:55:49 schwarze Exp $ REGRESS_TARGETS = spacing +TAG_TARGETS = spacing LINT_TARGETS = spacing HTML_TARGETS = spacing --- /dev/null +++ regress/mdoc/Dl/spacing.out_tag @@ -0,0 +1,3 @@ +NAME 3 +DESCRIPTION 6 +display 8 Index: spacing.out_ascii =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dl/spacing.out_ascii,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Dl/spacing.out_ascii -Lregress/mdoc/Dl/spacing.out_ascii -u -p -r1.2 -r1.3 --- regress/mdoc/Dl/spacing.out_ascii +++ regress/mdoc/Dl/spacing.out_ascii @@ -9,4 +9,4 @@ DDEESSCCRRIIPPTTIIOONN empty display: following text -OpenBSD July 4, 2017 OpenBSD +OpenBSD April 6, 2020 OpenBSD Index: Makefile =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dl/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -Lregress/mdoc/Dl/Makefile -Lregress/mdoc/Dl/Makefile -u -p -r1.3 -r1.4 --- regress/mdoc/Dl/Makefile +++ regress/mdoc/Dl/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.2 2015/02/06 02:04:35 schwarze Exp $ +# $OpenBSD: Makefile,v 1.5 2020/04/06 09:55:49 schwarze Exp $ REGRESS_TARGETS = spacing +TAG_TARGETS = spacing LINT_TARGETS = spacing .include Index: spacing.out_markdown =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dl/spacing.out_markdown,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Dl/spacing.out_markdown -Lregress/mdoc/Dl/spacing.out_markdown -u -p -r1.2 -r1.3 --- regress/mdoc/Dl/spacing.out_markdown +++ regress/mdoc/Dl/spacing.out_markdown @@ -14,4 +14,4 @@ empty display: following text -OpenBSD - July 4, 2017 +OpenBSD - April 6, 2020 Index: spacing.in =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dl/spacing.in,v retrieving revision 1.2 retrieving revision 1.3 diff -Lregress/mdoc/Dl/spacing.in -Lregress/mdoc/Dl/spacing.in -u -p -r1.2 -r1.3 --- regress/mdoc/Dl/spacing.in +++ regress/mdoc/Dl/spacing.in @@ -1,4 +1,4 @@ -.\" $OpenBSD: spacing.in,v 1.4 2017/07/04 14:53:25 schwarze Exp $ +.\" $OpenBSD: spacing.in,v 1.5 2020/04/06 09:55:49 schwarze Exp $ .Dd $Mdocdate$ .Dt DL-SPACING 1 .Os @@ -7,6 +7,7 @@ .Nd spacing in and around one-line literal displays .Sh DESCRIPTION preceding text +.Tg display .Dl spacing in and around one-line literal displays empty display: .Dl Index: spacing.out_lint =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Dl/spacing.out_lint,v retrieving revision 1.5 retrieving revision 1.6 diff -Lregress/mdoc/Dl/spacing.out_lint -Lregress/mdoc/Dl/spacing.out_lint -u -p -r1.5 -r1.6 --- regress/mdoc/Dl/spacing.out_lint +++ regress/mdoc/Dl/spacing.out_lint @@ -1 +1 @@ -mandoc: spacing.in:12:2: WARNING: empty block: Dl +mandoc: spacing.in:13:2: WARNING: empty block: Dl --- /dev/null +++ regress/mdoc/Tg/list.in @@ -0,0 +1,22 @@ +.\" $OpenBSD: list.in,v 1.1 2020/04/06 09:55:50 schwarze Exp $ +.Dd $Mdocdate: April 6 2020 $ +.Dt TG-LIST 1 +.Os +.Sh NAME +.Nm Tg-list +.Nd explicit tagging of lists and list elements +.Sh DESCRIPTION +BEGINTEST +.Tg dashlist +.Bl -dash +.Tg dashitem +.It +item +.El +.Tg taglist +.Bl -tag -width Ds +.Tg tagitem +.It tag +text +.El +ENDTEST --- /dev/null +++ regress/mdoc/Tg/column.out_ascii @@ -0,0 +1,13 @@ +TG-COLUMN(1) General Commands Manual TG-COLUMN(1) + +NNAAMMEE + TTgg--ccoolluummnn - explicit tagging of column lists and rows + +DDEESSCCRRIIPPTTIIOONN + BEGINTEST + + one two + 1 2 + ENDTEST + +OpenBSD April 6, 2020 OpenBSD --- /dev/null +++ regress/mdoc/Tg/list.out_markdown @@ -0,0 +1,19 @@ +TG-LIST(1) - General Commands Manual + +# NAME + +**Tg-list** - explicit tagging of lists and list elements + +# DESCRIPTION + +BEGINTEST + +- item + +tag + +> text + +ENDTEST + +OpenBSD - April 6, 2020 --- /dev/null +++ regress/mdoc/Tg/list.out_html @@ -0,0 +1,7 @@ + +
+
+
text
+
--- /dev/null +++ regress/mdoc/Tg/column.out_markdown @@ -0,0 +1,16 @@ +TG-COLUMN(1) - General Commands Manual + +# NAME + +**Tg-column** - explicit tagging of column lists and rows + +# DESCRIPTION + +BEGINTEST + + one two + 1 2 + +ENDTEST + +OpenBSD - April 6, 2020 --- /dev/null +++ regress/mdoc/Tg/column.out_html @@ -0,0 +1,10 @@ + + + + + + + + + +
onetwo
12
--- /dev/null +++ regress/mdoc/Tg/list.out_tag @@ -0,0 +1,6 @@ +NAME 3 +DESCRIPTION 6 +dashlist 8 +dashitem 9 +taglist 10 +tagitem 11 --- /dev/null +++ regress/mdoc/Tg/column.out_tag @@ -0,0 +1,5 @@ +NAME 3 +DESCRIPTION 6 +list 8 +row1 9 +row2 10 --- /dev/null +++ regress/mdoc/Tg/column.in @@ -0,0 +1,17 @@ +.\" $OpenBSD: column.in,v 1.1 2020/04/06 09:55:50 schwarze Exp $ +.Dd $Mdocdate: April 6 2020 $ +.Dt TG-COLUMN 1 +.Os +.Sh NAME +.Nm Tg-column +.Nd explicit tagging of column lists and rows +.Sh DESCRIPTION +BEGINTEST +.Tg list +.Bl -column one two +.Tg row1 +.It one Ta two +.Tg row2 +.It 1 2 +.El +ENDTEST Index: Makefile =================================================================== RCS file: /home/cvs/mandoc/mandoc/regress/mdoc/Tg/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -Lregress/mdoc/Tg/Makefile -Lregress/mdoc/Tg/Makefile -u -p -r1.1 -r1.2 --- regress/mdoc/Tg/Makefile +++ regress/mdoc/Tg/Makefile @@ -1,8 +1,10 @@ -# $OpenBSD: Makefile,v 1.1 2020/03/13 00:31:06 schwarze Exp $ +# $OpenBSD: Makefile,v 1.2 2020/04/06 09:55:50 schwarze Exp $ -REGRESS_TARGETS = warn -TAG_TARGETS = warn +REGRESS_TARGETS = column list warn +TAG_TARGETS = column list warn LINT_TARGETS = warn -HTML_TARGETS = warn +HTML_TARGETS = column list warn + +SKIP_TMAN = column .include --- /dev/null +++ regress/mdoc/Tg/list.out_ascii @@ -0,0 +1,14 @@ +TG-LIST(1) General Commands Manual TG-LIST(1) + +NNAAMMEE + TTgg--lliisstt - explicit tagging of lists and list elements + +DDEESSCCRRIIPPTTIIOONN + BEGINTEST + + -- item + + tag text + ENDTEST + +OpenBSD April 6, 2020 OpenBSD -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv