SF.net SVN: docutils:[10097 ] trunk
grubert--- via Docutils-checkins <[email protected]> Sun, 20 Apr 2025 12:40:46 +0000
| Newsgroups | gmane.text.docutils.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 10097
http://sourceforge.net/p/docutils/code/10097
Author: grubert
Date: 2025-04-20 12:40:46 +0000 (Sun, 20 Apr 2025)
Log Message:
-----------
no uri breakpoint if less then 3 chars follow
Modified Paths:
--------------
trunk/docutils/docutils/writers/manpage.py
trunk/sandbox/manpage-writer/TODO.rst
trunk/sandbox/manpage-writer/ref-breakpoints.py
Modified: trunk/docutils/docutils/writers/manpage.py
===================================================================
--- trunk/docutils/docutils/writers/manpage.py 2025-04-20 12:36:17 UTC (rev 10096)
+++ trunk/docutils/docutils/writers/manpage.py 2025-04-20 12:40:46 UTC (rev 10097)
@@ -97,9 +97,9 @@
# after number signs
# (?=.) avoids matching the end of string, requires something
# MAYBE require 5 after the break point
-NONBREAKING_INSERT_RE = re.compile(r'([/@?&#]+)(?=.)')
+NONBREAKING_INSERT_RE = re.compile(r'([/@?&#]+)(?=.{3,})')
# before each dot or a series of
-NONBREAKING_INSERT_RE2 = re.compile(r'([^\.]+)(?=\.+)(?=.)')
+NONBREAKING_INSERT_RE2 = re.compile(r'([^\.]+)(?=\.+)(?=.{3,})')
def insert_URI_breakpoints(s):
Modified: trunk/sandbox/manpage-writer/TODO.rst
===================================================================
--- trunk/sandbox/manpage-writer/TODO.rst 2025-04-20 12:36:17 UTC (rev 10096)
+++ trunk/sandbox/manpage-writer/TODO.rst 2025-04-20 12:40:46 UTC (rev 10097)
@@ -5,7 +5,7 @@
* references in text: ``Aaaaa \%(aaa@\:bb\:.ccc)``.
- protect from hyphenation at usual points
+ protect from hyphenation at usual points with ``\%``
AFTER setting good points with ``\:``.
Issues
Modified: trunk/sandbox/manpage-writer/ref-breakpoints.py
===================================================================
--- trunk/sandbox/manpage-writer/ref-breakpoints.py 2025-04-20 12:36:17 UTC (rev 10096)
+++ trunk/sandbox/manpage-writer/ref-breakpoints.py 2025-04-20 12:40:46 UTC (rev 10097)
@@ -42,7 +42,7 @@
("///abc.de", r"///\:abc\:.de"),
("/abc.de/", r"/\:abc\:.de/"),
("http://abc.de", r"http://\:abc\:.de"),
- ("http://abc.de/fg", r"http://\:abc\:.de/\:fg"),
+ ("http://abc.de/fg", r"http://\:abc\:.de/fg"),
("http://abc.de/fg?q=abc", r"http://\:abc\:.de/\:fg?\:q=abc"),
("http://abc.de/fg/?q=abc", r"http://\:abc\:.de/\:fg/?\:q=abc"),
("http://abc.de/fg/?q=abc&me#", r"http://\:abc\:.de/\:fg/?\:q=abc&\:me#"),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.