Defect #7495

Python multiline comments highlighting problem in Repository browser

Added by Graham King over 6 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Third-party libraries
Target version:1.4.0
Resolution:Fixed Affected version:1.3.2

Description

When viewing Python code (from an SVN repo) in the repository viewer multiline PyDoc style comments aren't highlighted correctly.

For example, the multiline comment in this ticket will highlight correctly, but not in the source viewer.

#!/usr/bin/python

def foo(bar):
    """Takes a bar and converts to a foo.
    This is not a good idea.""" 
    return bar

In the repository source viewer only the first line is highlighted.

We're running Redmine trunk r4786. I'm using Chrome on Linux.

About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /home/redmine/redmine
Environment               production
Database adapter          mysql
Database schema version   20101114115359

Related issues

Related to Redmine - Feature #4264: Update CodeRay to 1.0 final Closed

Associated revisions

Revision 9389
Added by Etienne Massip over 5 years ago

Updated CodeRay to 1.0.6.

Fixed multiline comments highlighting issue in file view (#7495).

History

#1 Updated by Ве Fio over 6 years ago

This actually happens to me also. I was wondering why it wasn't highlighting the multiline strings correctly.

#2 Updated by Etienne Massip over 6 years ago

It's a CodeRay issue which has already been fixed in trunk. Next release, due in 16 days, (1.0 RC1 !) should include the fix.

#3 Updated by Mischa The Evil over 6 years ago

  • Category changed from Text formatting to Third-party libraries
  • Target version set to Unplanned
  • Start date deleted (2011-01-30)
  • Affected version (unused) set to devel

Etienne Massip wrote:

It's a CodeRay issue which has already been fixed in trunk [...]

I presume you are talking about the trunk in the SCM of CodeRay, thus not Redmine trunk?!

Etienne Massip wrote:

Next release, due in 16 days, (1.0 RC1 !) should include the fix.

Since CodeRay 1.0 final might not make in into Redmine 1.3.0 I've created issue #8255 by copying issue #4264, changed issue-relations to reflect the upstream roadmap:

- related to Feature #4264: Update CodeRay to 1.0 final
+ related to Feature #8255: Consider updating CodeRay to 1.0 RC-x

and changed to new - more appropriate - category...

#4 Updated by Etienne Massip over 6 years ago

Mischa The Evil wrote:

I presume you are talking about the trunk in the SCM of CodeRay, thus not Redmine trunk?!

Indeed, sorry.

Since CodeRay 1.0 final might not make in into Redmine 1.3.0 I've created issue #8255 by copying issue #4264, changed issue-relations to reflect the upstream roadmap:

- related to Feature #4264: Update CodeRay to 1.0 final
+ related to Feature #8255: Consider updating CodeRay to 1.0 RC-x

and changed to new - more appropriate - category...

I just changed the relation to #8255 as a "blocked by", if it is ok for you ?

#5 Updated by Etienne Massip almost 6 years ago

Actually it is not a CodeRay issue, it's a Redmine issue which is not easy to fix since it is due to RM slicing the syntax highlighter's output to insert line numbering, breaking the HTML tree and thus the style inheritance.

And if we rely on CodeRay line numbering as suggested by #3382, then I guess this will definitely deny line wrapping, which may be annoying when viewing code attachments.

Any thoughts?

#6 Updated by Etienne Massip almost 6 years ago

Blocked by CodeRay issue 222.

#7 Updated by Etienne Massip over 5 years ago

  • Status changed from New to Resolved
  • Target version changed from Unplanned to 1.4.0
  • Affected version (unused) changed from devel to 1.3.2
  • Resolution set to Fixed
  • Affected version set to 1.3.2

Fixed with r9389 but not merged. Part of 1.4.0?

#8 Updated by Jean-Philippe Lang over 5 years ago

  • Status changed from Resolved to Closed

Merged, thanks.

Also available in: Atom PDF