Summary: | Symbol viewer's perl parser can incorrectly identify lines as the start of a comment | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | John Schroeder <schroederjohn88+kdebugs> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | schroederjohn88+kdebugs |
Priority: | NOR | ||
Version: | Git | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kate/dc74d823340c75a4d06b9b3da2c40dff04852af9 | Version Fixed In: | 4.11.1 |
Sentry Crash Report: | |||
Attachments: |
Sample test case
Proposed patch |
Description
John Schroeder
2013-08-15 04:36:01 UTC
Created attachment 81714 [details]
Sample test case
I have attached a sample test case that highlights the pitfalls of the current implementation. Created attachment 81715 [details]
Proposed patch
And finally, I've attached a patch that addresses these shortcomings by not trimming the line being analyzed until after comment detection has been attempted and by modifying the regular expression used to identify the beginning of a comment. Git commit 94719b9790671b27a80698ee55439f9a59db4b38 by Dominik Haumann. Committed on 15/08/2013 at 07:20. Pushed by dhaumann into branch 'master'. symbol viewer: fix perl parsing comments problem was: my $foo = 'bar'; Thanks to John Schroeder for the patch! FIXED-IN: 4.11.1 M +4 -3 addons/kate/symbolviewer/perl_parser.cpp http://commits.kde.org/kate/94719b9790671b27a80698ee55439f9a59db4b38 Git commit dc74d823340c75a4d06b9b3da2c40dff04852af9 by Dominik Haumann. Committed on 15/08/2013 at 07:20. Pushed by dhaumann into branch 'KDE/4.11'. symbol viewer: fix perl parsing comments problem was: my $foo = 'bar'; Thanks to John Schroeder for the patch! FIXED-IN: 4.11.1 M +4 -3 addons/kate/symbolviewer/perl_parser.cpp http://commits.kde.org/kate/dc74d823340c75a4d06b9b3da2c40dff04852af9 John, if you want, you can also ask for commit access http://sysadmin.kde.org/tickets/ so that you can commit yourself :-) |