Edgewall Software
Modify

Opened 12 years ago

Closed 11 years ago

Last modified 2 years ago

#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@…
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 (3)

patch_779_780_and_more.diff (18.6 KB) - added by tonib 12 years ago.
Patch for the ticket
patch_779_780_and_more.2.diff (19.9 KB) - added by tonib 12 years ago.
Forgot one file in the patch. This is the complete patch
WikiProcessor_refactoring--cs1343.diff (20.6 KB) - added by cboos@… 11 years ago.
Updated version of the patch

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by tonib

Attachment: patch_779_780_and_more.diff added

Patch for the ticket

Changed 12 years ago by tonib

Forgot one file in the patch. This is the complete patch

comment:1 Changed 12 years ago by daniel

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 Changed 12 years ago by Jonas Borgström

Milestone: 0.80.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 12 years ago by cboos@…

I use that patch for a long time now. Any chance it will get applied?

comment:4 Changed 12 years ago by anonymous

Is this going to be closed and included in the 0.81 bugfix release?

comment:5 Changed 12 years ago by anonymous

Cc: toni.brkic@… added

comment:6 Changed 11 years ago by Christopher Lenz

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 11 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 11 years ago by cboos@…

Updated version of the patch

comment:8 Changed 11 years ago by cboos@…

I've uploaded an updated version of tonib's patch, made against [1343].

Everything seems to be working:

comment:9 Changed 11 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 11 years ago by Christopher Lenz

Resolution: fixed
Status: newclosed

Patch applied in [1347]. Thanks!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.