Edgewall Software
Modify

Ticket #912 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Detect end of WikiName on ; ! ? } ] symbols

Reported by: Juanma Barranquero Owned by: jonas
Priority: normal Milestone: 0.8
Component: general Version: devel
Severity: minor Keywords: patch
Cc:
Release Notes:
API Changes:

Description

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

     
    156156</p> 
     157============================== 
     158SandBox SandBox, SandBox; SandBox: SandBox. SandBox? SandBox! (SandBox) {SandBox} [SandBox] 
     159------------------------------ 
     160<p> 
     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>] 
     162</p> 

Attachments

Change History

comment:1 Changed 8 years ago by jonas

  • Status changed from new to assigned

comment:2 Changed 8 years ago by jonas

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [1045].

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.