aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/regress/mdoc/Pp
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-04-18 20:40:10 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-04-18 20:40:10 +0000
commitfcd488027f8d6316b641cffa970d451df8a92c76 (patch)
treed6d2d4b2d01db1839ff1d98268209c616b5304bb /regress/mdoc/Pp
parent637b922ab2b2aa18419a0abed18ae9d2fed4e50a (diff)
downloadmandoc-fcd488027f8d6316b641cffa970d451df8a92c76.tar.gz
mandoc-fcd488027f8d6316b641cffa970d451df8a92c76.tar.zst
mandoc-fcd488027f8d6316b641cffa970d451df8a92c76.zip
When a .Tg is attached to a paragraph, attach the permalink
to the first word, or the first few words if they are short.
Diffstat (limited to 'regress/mdoc/Pp')
-rw-r--r--regress/mdoc/Pp/Makefile3
-rw-r--r--regress/mdoc/Pp/arg.in8
-rw-r--r--regress/mdoc/Pp/arg.out_ascii6
-rw-r--r--regress/mdoc/Pp/arg.out_html6
-rw-r--r--regress/mdoc/Pp/arg.out_lint6
-rw-r--r--regress/mdoc/Pp/arg.out_markdown9
-rw-r--r--regress/mdoc/Pp/arg.out_tag4
7 files changed, 31 insertions, 11 deletions
diff --git a/regress/mdoc/Pp/Makefile b/regress/mdoc/Pp/Makefile
index 03d32774..d13a1f3e 100644
--- a/regress/mdoc/Pp/Makefile
+++ b/regress/mdoc/Pp/Makefile
@@ -1,7 +1,8 @@
-# $OpenBSD: Makefile,v 1.7 2020/04/06 09:55:50 schwarze Exp $
+# $OpenBSD: Makefile,v 1.8 2020/04/18 20:28:46 schwarze Exp $
REGRESS_TARGETS = arg
TAG_TARGETS = arg
LINT_TARGETS = arg
+HTML_TARGETS = arg
.include <bsd.regress.mk>
diff --git a/regress/mdoc/Pp/arg.in b/regress/mdoc/Pp/arg.in
index 1e62c80c..542cb759 100644
--- a/regress/mdoc/Pp/arg.in
+++ b/regress/mdoc/Pp/arg.in
@@ -1,11 +1,13 @@
-.\" $OpenBSD: arg.in,v 1.5 2020/04/06 09:55:50 schwarze Exp $
-.Dd $Mdocdate: April 6 2020 $
+.\" $OpenBSD: arg.in,v 1.6 2020/04/18 20:28:46 schwarze Exp $
+.Dd $Mdocdate: April 18 2020 $
.Dt PP-ARG 1
.Os
.Sh NAME
.Nm Pp-arg
.Nd paragraph macro with arguments
.Sh DESCRIPTION
+BEGINTEST
+.Pp
line 1
.Tg first
.Pp drop this
@@ -17,3 +19,5 @@ line 4
.Tg last
.Pp
final text
+.Pp
+ENDTEST
diff --git a/regress/mdoc/Pp/arg.out_ascii b/regress/mdoc/Pp/arg.out_ascii
index 70eebb4d..86ebee94 100644
--- a/regress/mdoc/Pp/arg.out_ascii
+++ b/regress/mdoc/Pp/arg.out_ascii
@@ -4,6 +4,8 @@ NNAAMMEE
PPpp--aarrgg - paragraph macro with arguments
DDEESSCCRRIIPPTTIIOONN
+ BEGINTEST
+
line 1
line 2
@@ -13,4 +15,6 @@ DDEESSCCRRIIPPTTIIOONN
final text
-OpenBSD April 6, 2020 OpenBSD
+ ENDTEST
+
+OpenBSD April 18, 2020 OpenBSD
diff --git a/regress/mdoc/Pp/arg.out_html b/regress/mdoc/Pp/arg.out_html
new file mode 100644
index 00000000..c601661c
--- /dev/null
+++ b/regress/mdoc/Pp/arg.out_html
@@ -0,0 +1,6 @@
+<p class="Pp">line 1</p>
+<p class="Pp" id="first"><a class="permalink" href="#first">line 2</a>
+ <br/>
+ line 3</p>
+<p class="Pp">line 4</p>
+<p class="Pp" id="last"><a class="permalink" href="#last">final</a> text</p>
diff --git a/regress/mdoc/Pp/arg.out_lint b/regress/mdoc/Pp/arg.out_lint
index 40d77064..79cf10cb 100644
--- a/regress/mdoc/Pp/arg.out_lint
+++ b/regress/mdoc/Pp/arg.out_lint
@@ -1,3 +1,3 @@
-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
+mandoc: arg.in:15:5: ERROR: skipping all arguments: br drop this
+mandoc: arg.in:17:8: ERROR: skipping excess arguments: sp ... drop this
+mandoc: arg.in:13:2: ERROR: skipping all arguments: Pp drop
diff --git a/regress/mdoc/Pp/arg.out_markdown b/regress/mdoc/Pp/arg.out_markdown
index 0b06ac9e..a793f5a1 100644
--- a/regress/mdoc/Pp/arg.out_markdown
+++ b/regress/mdoc/Pp/arg.out_markdown
@@ -6,6 +6,8 @@ PP-ARG(1) - General Commands Manual
# DESCRIPTION
+BEGINTEST
+
line 1
line 2
@@ -13,6 +15,9 @@ line 3
line 4
-final text
+final
+text
+
+ENDTEST
-OpenBSD - April 6, 2020
+OpenBSD - April 18, 2020
diff --git a/regress/mdoc/Pp/arg.out_tag b/regress/mdoc/Pp/arg.out_tag
index 443b1be2..c58db368 100644
--- a/regress/mdoc/Pp/arg.out_tag
+++ b/regress/mdoc/Pp/arg.out_tag
@@ -1,4 +1,4 @@
NAME 3
DESCRIPTION 6
-first 9
-last 14
+first 11
+last 16