Ticket #801 (closed defect: fixed)
Opened 8 years ago
Last modified 7 years ago
[merge] patch, fix argument handling for wiki-macros and some refactoring
| Reported by: | tonib | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | wiki system | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: | toni.brkic@… | ||
| Release Notes: | |||
| API 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
Change History
Changed 8 years ago by tonib
- Attachment patch_779_780_and_more.diff added
Changed 8 years ago by tonib
- Attachment patch_779_780_and_more.2.diff added
Forgot one file in the patch. This is the complete patch
comment:1 Changed 8 years ago by daniel
- Milestone set to 0.8
- Summary changed from [merge] patch, fix argument handling for wiki-macros and some refatcoring to [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 Changed 8 years ago by jonas
- Milestone changed from 0.8 to 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:3 Changed 8 years ago by cboos@…
I use that patch for a long time now.
Any chance it will get applied?
comment:4 Changed 7 years ago by anonymous
Is this going to be closed and included in the 0.81 bugfix release?
comment:5 Changed 7 years ago by anonymous
- Cc toni.brkic@… added
comment:6 Changed 7 years ago by cmlenz
Any chance to see this patch updated to current trunk? I've tried applying it, but there's been lots of changes.
comment:7 Changed 7 years ago by cboos@…
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 :)
Changed 7 years ago by cboos@…
- Attachment WikiProcessor_refactoring--cs1343.diff added
Updated version of the patch
comment:8 Changed 7 years ago by cboos@…
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 Changed 7 years ago by cboos@…
(oops, the line 357
#801- mime_type = ""
in trac/WikiFormatter.py can be safely deleted)
Note: this comment will be rendered correctly iff the patch is applied
comment:10 Changed 7 years ago by cmlenz
- Resolution set to fixed
- Status changed from new to closed
Patch applied in [1347]. Thanks!



Patch for the ticket