Bug 382950 - Indenter: Lua "function " keyword picked up in string
Summary: Indenter: Lua "function " keyword picked up in string
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: indentation (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-31 09:17 UTC by FeepingCreature
Modified: 2022-01-18 15:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FeepingCreature 2017-07-31 09:17:51 UTC
Steps to reproduce:

1. Open kate
2. Switch syntax mode to "Lua"
3. Type in "function " and press return.

What happens:

kate indents the following line, presumably because it interprets the string as a function declaration.

What should happen:

Not that.
Comment 1 Dominik Haumann 2019-01-30 21:29:20 UTC
@Jonathan, since you are the author of the lua.js, could you have a look into this?
https://phabricator.kde.org/source/ktexteditor/browse/master/src/script/data/indentation/lua.js

I guess with functions like document.isCode(), isString(), isComment() etc. this probabl can easily be fixed. See API in:
https://phabricator.kde.org/source/ktexteditor/browse/master/src/script/katescriptdocument.h

See also: https://docs.kde.org/stable5/en/applications/katepart/dev-scripting.html