summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2020-04-18 20:28:47 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2020-04-18 20:28:47 +0000
commitadc0e7e7748edd333b4d5812fc65a5a80b390c3b (patch)
treeff4a4c428773b930cc227400d251e1415f1e24be /regress
parentbcc61c2472f57078a62b7714dcd78706d334efd5 (diff)
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')
-rw-r--r--regress/usr.bin/mandoc/mdoc/Bd/paragraph.out_html8
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pp/Makefile3
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pp/arg.in8
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pp/arg.out_ascii6
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pp/arg.out_html6
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pp/arg.out_lint6
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pp/arg.out_markdown9
-rw-r--r--regress/usr.bin/mandoc/mdoc/Pp/arg.out_tag4
-rw-r--r--regress/usr.bin/mandoc/mdoc/blank/transp.out_markdown3
9 files changed, 38 insertions, 15 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Bd/paragraph.out_html b/regress/usr.bin/mandoc/mdoc/Bd/paragraph.out_html
index f537335e0c7..07a0276995f 100644
--- a/regress/usr.bin/mandoc/mdoc/Bd/paragraph.out_html
+++ b/regress/usr.bin/mandoc/mdoc/Bd/paragraph.out_html
@@ -1,6 +1,8 @@
-<p class="Pp" id="npara">normal paragraph</p>
+<p class="Pp" id="npara"><a class="permalink" href="#npara">normal</a>
+ paragraph</p>
<div class="Bd Pp" id="filled">filled display
-<p class="Pp" id="fpara">paragraph in display</p>
+<p class="Pp" id="fpara"><a class="permalink" href="#fpara">paragraph</a> in
+ display</p>
</div>
back to normal
<p class="Pp">another paragraph</p>
@@ -9,7 +11,7 @@ back to normal
unfilled
display
<mark id="upara"></mark>
-unfilled
+<a class="permalink" href="#upara">unfilled</a>
paragraph
</pre>
</div>
diff --git a/regress/usr.bin/mandoc/mdoc/Pp/Makefile b/regress/usr.bin/mandoc/mdoc/Pp/Makefile
index 03d32774e3d..d13a1f3e190 100644
--- a/regress/usr.bin/mandoc/mdoc/Pp/Makefile
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Pp/arg.in b/regress/usr.bin/mandoc/mdoc/Pp/arg.in
index 1e62c80c377..542cb759f3a 100644
--- a/regress/usr.bin/mandoc/mdoc/Pp/arg.in
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Pp/arg.out_ascii b/regress/usr.bin/mandoc/mdoc/Pp/arg.out_ascii
index 70eebb4d991..86ebee94aad 100644
--- a/regress/usr.bin/mandoc/mdoc/Pp/arg.out_ascii
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Pp/arg.out_html b/regress/usr.bin/mandoc/mdoc/Pp/arg.out_html
new file mode 100644
index 00000000000..c601661c4ac
--- /dev/null
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Pp/arg.out_lint b/regress/usr.bin/mandoc/mdoc/Pp/arg.out_lint
index 40d77064c32..79cf10cb316 100644
--- a/regress/usr.bin/mandoc/mdoc/Pp/arg.out_lint
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Pp/arg.out_markdown b/regress/usr.bin/mandoc/mdoc/Pp/arg.out_markdown
index 0b06ac9ea60..a793f5a1254 100644
--- a/regress/usr.bin/mandoc/mdoc/Pp/arg.out_markdown
+++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Pp/arg.out_tag b/regress/usr.bin/mandoc/mdoc/Pp/arg.out_tag
index 443b1be2c9b..c58db3688f9 100644
--- a/regress/usr.bin/mandoc/mdoc/Pp/arg.out_tag
+++ b/regress/usr.bin/mandoc/mdoc/Pp/arg.out_tag
@@ -1,4 +1,4 @@
NAME 3
DESCRIPTION 6
-first 9
-last 14
+first 11
+last 16
diff --git a/regress/usr.bin/mandoc/mdoc/blank/transp.out_markdown b/regress/usr.bin/mandoc/mdoc/blank/transp.out_markdown
index 9c8ac8258fa..6c317e46632 100644
--- a/regress/usr.bin/mandoc/mdoc/blank/transp.out_markdown
+++ b/regress/usr.bin/mandoc/mdoc/blank/transp.out_markdown
@@ -23,7 +23,8 @@ Pp sp 2v:
sp Pp:
-Double sp:
+Double
+sp:
br blank: