Skip to content
Snippets Groups Projects
Commit 4814255d authored by Francis Herne's avatar Francis Herne
Browse files

Make the hack for finding attribute ranges more robust.

Previously, this would find an incorrect range if the attribute was
 immediately followed by a comment containing its name.

e.g. `foo.bar #bar` would highlight the comment.

This patch ensures that we ignore comments in all cases.
Unfortunately, this introduces a new (much less likely) failure case.

If the expression we're getting the attribute from contains a dot, the
 name of the attribute and a hash in that order (not necessarily
 consecutive), and the hash is on the same line as the attribute name,
 we wrongly interpret the hash as the start of a comment.

For example, `foo["...barrier#"].bar` will highlight part of the string.

This should be very unlikely to occur in practice.

Differential Revision: https://phabricator.kde.org/D3437
parent 25724661
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment