Edgewall Software
Modify

Opened 21 years ago

Closed 21 years ago

#322 closed defect (fixed)

Incorrect linking of partial CamelCase words

Reported by: cmlenz@… Owned by: Jonas Borgström
Priority: normal Milestone: 0.7
Component: wiki system Version: 0.6.1
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The support for auto-linking CamelCase words is incorrect: when I enter a word such as AlaBamA, it should not be linked at all. However, in 0.6.1 and 0.7-dev, the 'AlaBam' part is linked, while the trailing 'A' is left as is.

The correct behaviour would be to not link the word at all, I think.

Attachments (0)

Change History (3)

comment:1 by cmlenz@…, 21 years ago

Here's a patch to the wiki test suite that demonstrates the problem:

Index: trac/tests/wiki-tests.txt
===================================================================
--- trac/tests/wiki-tests.txt	(revision 474)
+++ trac/tests/wiki-tests.txt	(working copy)
@@ -55,3 +55,9 @@
 <a href="/ticket/1">ticket 1</a>, <a href="/changeset/1">changeset 1</a>, <a href="/report/1">report 1</a>, 
 <a href="/browser/foo/bar">source foo/bar</a>, <a href="http://www.edgewall.com/">edgewall</a>
 </p>
+==============================
+CamelCase AlabamA ABc AlaBamA
+------------------------------
+<p>
+<a class="missing" href="/wiki/CamelCase">CamelCase?</a> AlabamA ABc AlaBamA
+</p>
Index: trac/tests/wiki.py
===================================================================
--- trac/tests/wiki.py	(revision 474)
+++ trac/tests/wiki.py	(working copy)
@@ -16,12 +16,13 @@
         class Environment:
             def __init__(self):
                 self.href = Href.Href('/')
+		self._wiki_pages = {}
                 
         out = StringIO.StringIO()
         Formatter(None, Environment()).format(self.input, out)
         if out.getvalue() != self.correct:
-            print "'%s' != '%s'" % (out.getvalue(), correct)
-            assert correct == out.getvalue()
+            print "'%s' != '%s'" % (out.getvalue(), self.correct)
+            assert self.correct == out.getvalue()
 
 def suite():
     suite = unittest.TestSuite()

I hope this comes out right ;-)

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

Milestone: 0.7
Status: newassigned

comment:3 by Jonas Borgström, 21 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [477].

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.