Modify ↓
#10278 closed defect (fixed)
Plugin found to be working on 1.0rc1 - but needs a patch for python2.6
Reported by: | sdegrande | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | MarkdownMacro |
Severity: | normal | Keywords: | compatibility |
Cc: | Trac Release: | 1.0 |
Description
This plugin works on 1.0, but a patch is needed for python 2.6, as the one proposed in #9157, or the following one:
-
markdownmacro/0.11/Markdown/macro.py
diff -r ec2c58e517b9 markdownmacro/0.11/Markdown/macro.py
a b 27 27 LINK = compile( 28 28 r'(\]\()([^) ]+)([^)]*\))|(<)([^>]+)(>)|(\n\[[^]]+\]: *)([^ \n]+)(.*\n)' 29 29 ) 30 HREF = compile(r'href=[\'"]?([^\'" ]*)' )30 HREF = compile(r'href=[\'"]?([^\'" ]*)', I) 31 31 32 32 __all__ = ['MarkdownMacro'] 33 33 … … 47 47 f.format(target, out) 48 48 url = search( 49 49 HREF, 50 out.getvalue(), 51 I).groups()[0] 50 out.getvalue()).groups()[0] 52 51 # Trac creates relative links, which Markdown won't touch inside 53 52 # <autolinks> because they look like HTML 54 53 if pre == '<' and url != target:
I do not know python's internals, so I don't know which one is the more efficient. I suppose that such a patch is compatible with other 2.x versions of python, but I was not able to check.
Attachments (0)
Change History (6)
comment:1 Changed 12 years ago by
Cc: | anonymous added; Ryan J Ollos removed |
---|---|
Owner: | changed from Douglas Clifton to Ryan J Ollos |
Type: | task → defect |
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
sdegrande: thank you for yet another patch. Please test the latest trunk
and report back if you can. If there are any other open tickets for unmaintained plugins with patches from you, please CC me on them and I'll get the patches applied.
comment:4 follow-up: 6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 Changed 12 years ago by
Note: See
TracTickets for help on using
tickets.
(In [12084]) Refs #10278: Renamed
0.11
directory totrunk
.