Wrong highlighting in Ruby files

Bug #391412 reported by Display Name
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
New
Undecided
Unassigned
loggerhead
Invalid
Undecided
Unassigned

Bug Description

Examples:

http://bazaar.launchpad.net/~renatosilva/+junk/utilities/annotate/head:/ganyclean.rb
http://bazaar.launchpad.net/~renatosilva/+junk/utilities/annotate/head:/testonsave.rb

The problem is in arg.gsub(/\\/, '/'), it thinks \/ is escaping \, however the \ is itself escaped. Therefore / is actually closing the regex.

Revision history for this message
Matt Nordhoff (mnordhoff) wrote : Re: [Bug 391412] [NEW] Wrong highlighting in Ruby files

Without actually looking into this, Loggerhead uses the Pygments
<http://pygments.org/> syntax highlighting library, so it's almost
assuredly a bug in that, not Loggerhead.

This may have also been fixed in a newer version of Pygments than
Launchpad runs.

Revision history for this message
Display Name (user340562791542-deactivatedaccount) wrote :

I've sent an email to Georg.

Revision history for this message
Display Name (user340562791542-deactivatedaccount) wrote :

"this was a bug and is now fixed in pygments HEAD revision c69645e7e8b2. It will be in version 1.1." -- Georg.

Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

OK, good. That confirms it's not a Loggerhead bug, then.

Changed in loggerhead:
status: New → Invalid
Revision history for this message
Display Name (user340562791542-deactivatedaccount) wrote :

Instead, it's a bug in Launchpad site itself, right?

Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

Upgrading LP's copy of Pygments is covered in bug #384023, FYI. Not sure what to do. Maybe open a new bug and dupe these two on it? I dunno. Or just dupe this one on that?

affects: launchpad → launchpad-code
Revision history for this message
Display Name (user340562791542-deactivatedaccount) wrote :

Will the upgrade to 1.1 solve both bugs?

How about creating a bug like "Update Pygments library to version 1.1"?

Then both bugs would be checked as duplicates of the new bug (not because they're the same bug, but because solving the new bug will solve the others too).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.