Bug 233210

Summary: Multi-line comment function fails in mixed php/html
Product: [Applications] kate Reporter: Mark A. Taff <kde>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 0.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.5.4
Attachments: The original php file
A diff showing the expected results of using the comment function

Description Mark A. Taff 2010-04-03 22:46:02 UTC
Version:           4.0 beta 9 (using KDE 4.4.2)
OS:                Linux
Installed from:    openSUSE RPMs

Using Kate editor component.  The comment function (ctrl+D) fails to make a multi-line comment in a php file with mixed php/html.

In the original file, there were several html & php lines outside of php tags.  I wanted to comment them out in php, as opposed to in html, so they would ever get output to the browser.  I surround the html in question with php tags, and then highlighted the html lines I wanted to comment out.  Pressing the comment shortcut (ctrl-d) did not comment them out.

ctrl-d will properly create a single-line comment on the current line (using //), or the currently selected line (using /* ... */).

The expected behavior is for kdevelop to comment multiple lines, using the multi-line comment syntax for the outer-most block, php in this case.  I note that this issue also exists in kwrite3, so this is seemingly not a regression.

I will attach an original source file, as well as a unified diff simulating the expecting comment behavior.
Comment 1 Mark A. Taff 2010-04-03 22:47:03 UTC
Created attachment 42467 [details]
The original php file
Comment 2 Mark A. Taff 2010-04-03 22:49:41 UTC
Created attachment 42468 [details]
A diff showing the expected results of using the comment function

Thanks!
Comment 3 Pascal Létourneau 2010-11-07 20:29:57 UTC
SVN commit 1193975 by pletourn:

Fix commenting empty lines

BUG:233210


 M  +12 -23    document/katedocument.cpp  
 M  +5 -0      syntax/katehighlight.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1193975
Comment 4 Pascal Létourneau 2010-11-07 20:33:40 UTC
SVN commit 1193979 by pletourn:

Fix commenting empty lines

BUG:233210


 M  +12 -23    document/katedocument.cpp  
 M  +5 -0      syntax/katehighlight.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1193979