|
From: <gr...@us...> - 2019-08-25 09:53:38
|
Revision: 8336
http://sourceforge.net/p/docutils/code/8336
Author: grubert
Date: 2019-08-25 09:53:36 +0000 (Sun, 25 Aug 2019)
Log Message:
-----------
Apply fix for [ 289 ], line starting with ``.`` in a text.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/writers/manpage.py
trunk/docutils/test/test_writers/test_manpage.py
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2019-08-25 09:40:56 UTC (rev 8335)
+++ trunk/docutils/HISTORY.txt 2019-08-25 09:53:36 UTC (rev 8336)
@@ -46,6 +46,10 @@
- Fix: ElementTree.getchildren deprecated warning
+* docutils/writers/manpage.py
+
+ - Apply fix for [ 289 ], line starting with ``.`` in a text.
+
* test/alltests.py
- Fix: 377 ResourceWarning: unclosed file python3.8
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2019-08-25 09:40:56 UTC (rev 8335)
+++ trunk/docutils/docutils/writers/manpage.py 2019-08-25 09:53:36 UTC (rev 8336)
@@ -958,8 +958,11 @@
self.ensure_eol()
if not self.first_child(node):
self.body.append('.sp\n')
+ # set in literal to escape dots after a new-line-character
+ self._in_literal = True
def depart_paragraph(self, node):
+ self._in_literal = False
self.body.append('\n')
def visit_problematic(self, node):
Modified: trunk/docutils/test/test_writers/test_manpage.py
===================================================================
--- trunk/docutils/test/test_writers/test_manpage.py 2019-08-25 09:40:56 UTC (rev 8335)
+++ trunk/docutils/test/test_writers/test_manpage.py 2019-08-25 09:53:36 UTC (rev 8336)
@@ -137,6 +137,9 @@
something important
. period at line start.
+
+and . in a line and at line start
+.in a paragraph
""",
r""".\" Man page generated from reStructuredText.
.
@@ -195,6 +198,9 @@
.UNINDENT
.sp
\&. period at line start.
+.sp
+and . in a line and at line start
+\&.in a paragraph
.SH AUTHOR
so...@so...
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|