SF.net SVN: docutils:[10058 ] trunk

grubert--- via Docutils-checkins <[email protected]> Sat, 22 Mar 2025 17:23:45 +0000
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 10058
          http://sourceforge.net/p/docutils/code/10058
Author:   grubert
Date:     2025-03-22 17:23:42 +0000 (Sat, 22 Mar 2025)
Log Message:
-----------
manpage macro-references one less newline

Modified Paths:
--------------
    trunk/docutils/docutils/writers/manpage.py
    trunk/sandbox/manpage-writer/expected/refs-urue.man
    trunk/sandbox/manpage-writer/expected/refs-urue.utf8
    trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.man
    trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.ps
    trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.utf8

Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py	2025-03-22 17:14:38 UTC (rev 10057)
+++ trunk/docutils/docutils/writers/manpage.py	2025-03-22 17:23:42 UTC (rev 10058)
@@ -1098,8 +1098,8 @@
     def _visit_reference_with_macro(self, node) -> None:
         # use UR/UE or MT/ME
         # TODO insert_URI_breakpoints in text or refuri
-        self.ensure_eol()
         if 'refuri' in node:
+            self.ensure_eol()
             if node['refuri'].startswith('mailto:'):
                 self.body.append(".MT ")
                 self.context.append('.ME\n')

Modified: trunk/sandbox/manpage-writer/expected/refs-urue.man
===================================================================
--- trunk/sandbox/manpage-writer/expected/refs-urue.man	2025-03-22 17:14:38 UTC (rev 10057)
+++ trunk/sandbox/manpage-writer/expected/refs-urue.man	2025-03-22 17:23:42 UTC (rev 10058)
@@ -61,11 +61,9 @@
 labels\(aq \- for instance,
 [4] and [3]\&.
 .IP [3] 5
-a.k.a. 
-third
+a.k.a. third
 .IP [4] 5
-a.k.a. 
-fourth
+a.k.a. fourth
 
 .sp
 .ce
@@ -95,8 +93,7 @@
 Case is not significant.
 .sp
 Given a citation like [this], one
-can also refer to it like 
-this\&.
+can also refer to it like this\&.
 .IP [this] 5
 here.
 .SS External Hyperlink Targets
@@ -114,8 +111,7 @@
 \&.
 .SS Internal Hyperlink Targets
 .sp
-Internal cross\-references, like 
-example\&.
+Internal cross\-references, like example\&.
 .sp
 This is an example cross\-reference target.
 .SS Indirect Hyperlink Targets
@@ -131,8 +127,7 @@
 \&.
 .SH Titles are targets, too
 .sp
-Implicit references, like 
-Titles are
+Implicit references, like Titles are
 targets, too\&.
 .SH and
 .sp

Modified: trunk/sandbox/manpage-writer/expected/refs-urue.utf8
===================================================================
--- trunk/sandbox/manpage-writer/expected/refs-urue.utf8	2025-03-22 17:14:38 UTC (rev 10057)
+++ trunk/sandbox/manpage-writer/expected/refs-urue.utf8	2025-03-22 17:23:42 UTC (rev 10058)
@@ -24,9 +24,9 @@
             They  may  be assigned 'autonumber labels' - for instance, [4] and
             [3].
 
-       [3]  a.k.a.  third
+       [3]  a.k.a. third
 
-       [4]  a.k.a.  fourth
+       [4]  a.k.a. fourth
 
 
                                            ----

Modified: trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.man
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.man	2025-03-22 17:14:38 UTC (rev 10057)
+++ trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.man	2025-03-22 17:23:42 UTC (rev 10058)
@@ -61,11 +61,9 @@
 labels\(aq \- for instance,
 [4] and [3]\&.
 .IP [3] 5
-a.k.a. 
-third
+a.k.a. third
 .IP [4] 5
-a.k.a. 
-fourth
+a.k.a. fourth
 
 .sp
 .ce
@@ -95,8 +93,7 @@
 Case is not significant.
 .sp
 Given a citation like [this], one
-can also refer to it like 
-this\&.
+can also refer to it like this\&.
 .IP [this] 5
 here.
 .SS External Hyperlink Targets
@@ -114,8 +111,7 @@
 \&.
 .SS Internal Hyperlink Targets
 .sp
-Internal cross\-references, like 
-example\&.
+Internal cross\-references, like example\&.
 .sp
 This is an example cross\-reference target.
 .SS Indirect Hyperlink Targets
@@ -131,8 +127,7 @@
 \&.
 .SH Titles are targets, too
 .sp
-Implicit references, like 
-Titles are
+Implicit references, like Titles are
 targets, too\&.
 .SH and
 .sp

Modified: trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.ps
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.ps	2025-03-22 17:14:38 UTC (rev 10057)
+++ trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.ps	2025-03-22 17:23:42 UTC (rev 10058)
@@ -102,10 +102,10 @@
 404.371([3].)c
 87.274 349.041([3])s
 114.774(a.k.a.)c
-143.792(third)c
+141.042(third)c
 87.274 318.263([4])s
 114.774(a.k.a.)c
-143.792(fourth)c
+141.042(fourth)c
 322.190 272.096(----)s
 114.774 195.151(Auto-symbol)s
 175.582(footnotes)c

Modified: trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.utf8
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.utf8	2025-03-22 17:14:38 UTC (rev 10057)
+++ trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.utf8	2025-03-22 17:23:42 UTC (rev 10058)
@@ -25,9 +25,9 @@
             They may be assigned 'autonumber labels' - for instance, [4] and
             [3].
 
-       [3]  a.k.a.  third
+       [3]  a.k.a. third
 
-       [4]  a.k.a.  fourth
+       [4]  a.k.a. fourth
 
 
                                            ----

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.