Haskell nested block comments parsed incorrectly

Bug #213785 reported by Chet Gray
4
Affects Status Importance Assigned to Milestone
GtkSourceView
Fix Released
Medium
gtksourceview (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Release: Ubuntu hardy (development branch) 8.04
Package: libgtksourceview2.0-common
Package version: 2.2.0-2

Haskell block comments can be nested correctly, unlike C block comments. A block comment inside another block comment should not prematurely close the outer block comment. However, GtkSourceView parses this incorrectly and treats nested comments as with C block comments, with the first closing comment marker reached closing all previously opened block comment levels, regardless of nesting depth.

Steps to reproduce:
1) Start an application using GtkSourceView, e.g. gedit
2) Set language to Haskell (haskell.lang). In gedit, View > Highlight Mode > Sources > Haskell
3) Type an opening block comment marker "{-". Text color changes to indicate a comment.
4) Type another opening block comment marker to nest a second block comment. Text color still indicates a comment.
5) Type a closing block comment marker to close the inner nested block comment.
6) Type some comment text.
7) Type another closing block comment marker to close the outer block comment.
Expected: The second closing block comment marker and the text before it should be colored to indicate a comment.
Actual: They are colored as normal text.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: http://bugzilla.gnome.org/show_bug.cgi?id=532964

Changed in gtksourceview:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Triaged
Changed in gtksourceview:
status: Unknown → New
Changed in gtksourceview:
status: New → Fix Released
Revision history for this message
Greg A (etulfetulf) wrote :

A fix for this has been released upstream and I cannot reproduce this in Intrepid Ubuntu testing.

Changed in gtksourceview:
status: Triaged → Fix Released
Changed in gtksourceview:
importance: Unknown → Medium
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.