Edgewall Software

Opened 18 years ago

Closed 18 years ago

#912 closed defect (fixed)

Detect end of WikiName on ; ! ? } ] symbols

Reported by: Juanma Barranquero Owned by: Jonas Borgström
Priority: normal Milestone: 0.8
Component: general Version: devel
Severity: minor Keywords: patch
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


Currently, ".", ",", ":" and ")" finish parsing a WikiName, but ";", "?", "!!", ")" and "}" do not, even if all of them, except perhaps "}", are usual in normal writing and likely to follow a valid WikiName.

The attached patch to WikiFormatting.py makes them valid as WikiName "finishers". I've also patched the test, though I didn't run it (I'm not entirely sure what's the usual way to run the tests).

  • trac/WikiFormatter.py

    4747              r"""(?P<modulehref>!?((?P<modulename>bug|ticket|browser|source|repos|report|changeset|wiki|milestone|search):(?P<moduleargs>("(.*?)"|'(.*?)')|([^ ]*[^\., \)]))))""",
    48               r"""(?P<wikilink>!?(^|(?<=[^A-Za-z]))[A-Z][a-z]+(?:[A-Z][a-z]*[a-z/])+(?=\Z|\s|,|\.|:|\)))""",
     48              r"""(?P<wikilink>!?(^|(?<=[^A-Za-z]))[A-Z][a-z]+(?:[A-Z][a-z]*[a-z/])+(?=\Z|\s|[.,;:!?\)}\]]))""",
    4949              r"""(?P<fancylink>!?\[(?P<fancyurl>([a-z]+:[^ ]+)) (?P<linkname>.*?)\])"""]
  • trac/tests/wiki-tests.txt

     158SandBox SandBox, SandBox; SandBox: SandBox. SandBox? SandBox! (SandBox) {SandBox} [SandBox]
     161<a href="/trac/wiki/SandBox">SandBox</a> <a href="/trac/wiki/SandBox">SandBox</a>, <a href="/trac/wiki/SandBox">SandBox</a>; <a href="/trac/wiki/SandBox">SandBox</a>: <a href="/trac/wiki/SandBox">SandBox</a>. <a href="/trac/wiki/SandBox">SandBox</a>? <a href="/trac/wiki/SandBox">SandBox</a>! (<a href="/trac/wiki/SandBox">SandBox</a>) {<a href="/trac/wiki/SandBox">SandBox</a>} [<a href="/trac/wiki/SandBox">SandBox</a>]

Attachments (0)

Change History (2)

comment:1 by Jonas Borgström, 18 years ago

Status: newassigned

comment:2 by Jonas Borgström, 18 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [1045].

Modify Ticket

Change Properties
Set your email in Preferences
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.