#801 closed defect (fixed)
[merge] patch, fix argument handling for wiki-macros and some refactoring
Reported by: | tonib | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | 0.9 |
Component: | wiki system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | toni.brkic@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
This patch a couple of things.
- You couldnt pass the characters <,>,&," in the arguments for macros. Since the it was made util.escape on the line. I have added a funtion util.unescape that is done on the arguments before passing to the macro.
- You couldnt have a ) in the argument. I changed the regex for the macro so that you can use this. I also changed it to non-greedy so that you can still write two macros on a line.
- Added so that one can write inline html or syntax hihglightning. Example [[html(<B>test</B>)]] or [[python(class test))]]. The idea is to use the macro syntax for this.
- Started refactoring to take out from the formatter class that other wikimacros need to create wiki syntax. This is done so that it should be easy to do another wiki syntax processer that supports all special trac syntax.
I have added tests for the argument handling and inline macros.
The patch is continuation on what I did on for 779 and 780, so the patch contains those fixes aswell.
Attachments (3)
Change History (13)
by , 20 years ago
Attachment: | patch_779_780_and_more.diff added |
---|
by , 20 years ago
Attachment: | patch_779_780_and_more.2.diff added |
---|
Forgot one file in the patch. This is the complete patch
comment:1 by , 20 years ago
Milestone: | → 0.8 |
---|---|
Summary: | [merge] patch, fix argument handling for wiki-macros and some refatcoring → [merge] patch, fix argument handling for wiki-macros and some refactoring |
patches should be reviewed and merged for 0.8 if alright, if not ⇒ 0.9.
comment:2 by , 20 years ago
Milestone: | 0.8 → 0.9 |
---|
I think it's better to wait until 0.9 so the changes get more testing before being included in a stable release.
comment:5 by , 20 years ago
Cc: | added |
---|
comment:6 by , 20 years ago
Any chance to see this patch updated to current trunk? I've tried applying it, but there's been lots of changes.
comment:7 by , 20 years ago
I'll have a try, since I applied that patch some time ago and maintained it till [1189], that's only less than 200 changesets to go :)
by , 20 years ago
Attachment: | WikiProcessor_refactoring--cs1343.diff added |
---|
Updated version of the patch
comment:8 by , 20 years ago
I've uploaded an updated version of tonib's patch, made against [1343].
Everything seems to be working:
- WikiRestructuredText
- WikiRestructuredTextLinks
- WikiProcessors
- WikiMacros
- …and all the unit tests in source:trunk/trac/tests/wiki.py
comment:9 by , 20 years ago
(oops, the line 357 #801- mime_type = ""
trac/WikiFormatter.py
can be safely deleted)
Note: this comment will be rendered correctly iff the patch is applied
comment:10 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch applied in [1347]. Thanks!
Patch for the ticket