Edgewall Software

Ticket #801 (closed defect: fixed)

Opened 4 years ago

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

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

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

Change History

Changed 4 years ago by tonib

Patch for the ticket

Changed 4 years ago by tonib

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

Changed 4 years ago by daniel

  • 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
  • milestone set to 0.8

patches should be reviewed and merged for 0.8 if alright, if not => 0.9.

Changed 4 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.

Changed 4 years ago by cboos@…

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

Changed 3 years ago by anonymous

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

Changed 3 years ago by anonymous

  • cc toni.brkic@… added

Changed 3 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.

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

Updated version of the patch

Changed 3 years ago by cboos@…

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

Everything seems to be working:

Changed 3 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

Changed 3 years ago by cmlenz

  • status changed from new to closed
  • resolution set to fixed

Patch applied in [1347]. Thanks!

Add/Change #801 ([merge] patch, fix argument handling for wiki-macros and some refactoring)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.