Bug 233210 - Multi-line comment function fails in mixed php/html
Summary: Multi-line comment function fails in mixed php/html
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: 0.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-03 22:46 UTC by Mark A. Taff
Modified: 2010-11-07 20:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.5.4
Sentry Crash Report:


Attachments
The original php file (1.06 KB, application/x-php)
2010-04-03 22:47 UTC, Mark A. Taff
Details
A diff showing the expected results of using the comment function (862 bytes, patch)
2010-04-03 22:49 UTC, Mark A. Taff
Details

Note You need to log in before you can comment on or make changes to this bug.
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