root/generallinksyntaxplugin/0.9/formatter.patch

Revision 102, 1.0 kB (checked in by gotoh, 3 years ago)

GeneralLinkSyntaxPlugin:

Added a patch to allow more relax namespace of trac link.

  • formatter.py

    old new  
    137137                  r"(?P<inlinecode>!?\{\{\{(?P<inline>.*?)\}\}\})", 
    138138                  r"(?P<inlinecode2>!?`(?P<inline2>.*?)`)", 
    139139                  r"(?P<htmlescapeentity>!?&#\d+;)"] 
    140     _post_rules = [r"(?P<shref>!?((?P<sns>\w+):(?P<stgt>'[^']+'|\"[^\"]+\"|((\|(?=[^| ])|[^| ])*[^|'~_\., \)]))))", 
    141                    r"(?P<lhref>!?\[(?P<lns>\w+):(?P<ltgt>[^\] ]+)(?: (?P<label>.*?))?\])", 
     140    _post_rules = [r"(?P<shref>!?((?P<sns>\w+(?:[-+_]\w+)*):(?P<stgt>'[^']+'|\"[^\"]+\"|((\|(?=[^| ])|[^| ])*[^|'~_\., \)]))))", 
     141                   r"(?P<lhref>!?\[(?P<lns>\w+(?:[-+_]\w+)*):(?P<ltgt>[^\] ]+)(?: (?P<label>.*?))?\])", 
    142142                   r"(?P<macro>!?\[\[(?P<macroname>[\w/+-]+)(\]\]|\((?P<macroargs>.*?)\)\]\]))", 
    143143                   r"(?P<heading>^\s*(?P<hdepth>=+)\s.*\s(?P=hdepth)\s*$)", 
    144144                   r"(?P<list>^(?P<ldepth>\s+)(?:\*|\d+\.) )", 
Note: See TracBrowser for help on using the browser.