Edgewall Software

Ticket #2655 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Repeated links in multiline comments

Reported by: Tim Hatch <trac@…> Owned by: cmlenz
Priority: normal Milestone: 0.10
Component: version control/browser Version: devel
Severity: normal Keywords:
Cc:

Description

There is a regression caused by r2769 in source:trunk/trac/mimeview/api.py for multiline blocks. I've verified it with the Clearsilver-generated code for both Python and CSS highlighting (I've only noticed it in the browser view). Here's my testcase:

"""
a http://google.com/
Test
Test
"""

The bug manifests itself as the following being displayed (without formatting, but you get the idea):

1 	"""
2 	a http://google.com/
3 	a http://google.comTest
4 	a http://google.comTest
5 	a http://google.com"""

The anchor tag (and text thus far on the line) appear to be reinserted on subsequent lines until the end of the comment block. This worked correctly prior to r2769. Looking at this changeset, I moved the question mark to more closely reproduce the prior behavior (making dot-star nongreedy, rather than making the capturing group optional).

I'll attach the patch in a second.

Attachments

multiline-link-regexp-fix.diff (0.5 kB) - added by Tim Hatch <trac@…> 3 years ago.
Diff against trunk @ r2824

Change History

Changed 3 years ago by Tim Hatch <trac@…>

Diff against trunk @ r2824

Changed 3 years ago by cmlenz

  • owner changed from jonas to cmlenz
  • status changed from new to assigned
  • version changed from 0.9.3 to devel
  • milestone set to 0.10

Changed 3 years ago by cmlenz

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

Fixed in [2828]. Thanks for the patch!

Add/Change #2655 (Repeated links in multiline comments)

Author



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