ivansafrin/Polycode — pull request #417 by TheCosmotect (2014-01-09 02:21:50+00:00)
Title: Tweaked findBar’s functionList to not display any mention of ‘function’ that is not the start of a line

The problem right now in a code editor's findBar's functionList (⌘F on Mac) is that it will accept as a function any line of text with the word "function" in it. This includes references within single-line comments (`--function test() ... end`) and within strings ("error. invalid function name"). This adjustment makes it so that it only considers a line of code that has `function` as the first characters of the line.

The limitations of this quick fix is that there can't be any tabs or spaces before the keyword (which you probably wouldn't have anyway), and, more crucially, it won't ignore any first-characters instances of `function` that are enclosed in multi-line comments. But I think it's at least an improvement over the current reality.