Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

Last modified 11 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@… 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)

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

Download all attachments as: .zip

Change History (13)

by tonib, 20 years ago

Attachment: patch_779_780_and_more.diff added

Patch for the ticket

by tonib, 20 years ago

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

comment:1 by daniel, 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 Jonas Borgström, 20 years ago

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

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

comment:4 by anonymous, 20 years ago

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

comment:5 by anonymous, 20 years ago

Cc: toni.brkic@… added

comment:6 by Christopher Lenz, 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 cboos@…, 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 cboos@…, 20 years ago

Updated version of the patch

comment:8 by cboos@…, 20 years ago

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

Everything seems to be working:

comment:9 by cboos@…, 20 years ago

(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 by Christopher Lenz, 20 years ago

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.