[Trac-tickets] Re: [The Trac Project] #2172: TrackLinks broken
The Trac Project
noreply at edgewall.com
Wed Oct 19 07:23:08 CDT 2005
#2172: TrackLinks broken
--------------------------------------+-------------------------------------
Reporter: Karl <karl at rockynet.com> | Owner: cboos
Type: defect | Status: assigned
Priority: high | Milestone: 0.9
Component: general | Version: 0.9b2
Severity: major | Resolution:
Keywords: |
--------------------------------------+-------------------------------------
Comment (by cboos):
The following changes (using `\s` instead of spaces)
would fix the problem:
{{{
#!diff
Index: trac/wiki/formatter.py
===================================================================
--- trac/wiki/formatter.py (revision 2388)
+++ trac/wiki/formatter.py (working copy)
@@ -149,11 +149,11 @@
r"(?P<htmlescapeentity>!?&#\d+;)"]
_post_rules = [(r"(?P<shref>!?((?P<sns>%s):" % LINK_SCHEME +
r"(?P<stgt>'[^']+'|\"[^\"]+\"|"
- r"(?:\|(?=[^| ])|&(?!lt;)|[^|& ])*[^|'~_\.,&
\)])))"),
+
r"(?:\|(?=[^|\s])|&(?!lt;)|[^|&\s])*[^|'~_\.,&\s\)])))"),
(r"(?P<lhref>!?\[(?:(?P<lns>%s):" % LINK_SCHEME +
- r"(?P<ltgt>'[^']+'|\"[^\"]+\"|[^\] ]*)"
- r"|(?P<rel>[/.][^ [\]]*))"
- r"(?: (?P<label>'[^']+'|\"[^\"]+\"|[^\]]+))?\])"),
+ r"(?P<ltgt>'[^']+'|\"[^\"]+\"|[^\]\s]*)"
+ r"|(?P<rel>[/.][^\s[\]]*))"
+ r"(?:\s+(?P<label>'[^']+'|\"[^\"]+\"|[^\]]+))?\])"),
(r"(?P<macro>!?\[\[(?P<macroname>[\w/+-]+)"
r"(\]\]|\((?P<macroargs>.*?)\)\]\]))"),
r"(?P<heading>^\s*(?P<hdepth>=+)\s.*\s(?P=hdepth)\s*$)",
}}}
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/2172>
The Trac Project <http://trac.edgewall.com/>
More information about the Trac-Tickets
mailing list