Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groovy syntax highlighting and quoted method names #11

Open
dexX7 opened this issue Jan 29, 2015 · 1 comment
Open

Groovy syntax highlighting and quoted method names #11

dexX7 opened this issue Jan 29, 2015 · 1 comment

Comments

@dexX7
Copy link

dexX7 commented Jan 29, 2015

Hi there, when using Groovy and quoted method names, it looks like two or more words at the beginning, followed by parenthesis breaks the syntax highlighting:

def "Those () or () () and neither (x) breaks a quoted method name"() {
  expect: true
}

def "Word and () however breaks a quoted method name"() {
  expect: true
}
@alisonatwork
Copy link

I think the bug is that quoted method names are not detected as method names as at all.

See:

\s+
([^=]+\s+)?\w+\s*\(
))</string>

I think it's this piece of code which detects a method declaration. If it is, then we have this ([^=]+\s+)?\w+\s*\( regex fragment where \w+ is the piece that's supposed to be matching the method name. I am pretty sure it should be one of [a-zA-Z_]\w* or a quoted string matcher. I just submitted a similar change for Pygments pygments/pygments#1765 and would be happy to make one here too, but I am not sure if the project is still maintained?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants