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

Function declarations (missing body) break highlighting for following code #64

Open
mmcloughlin opened this issue May 21, 2018 · 1 comment

Comments

@mmcloughlin
Copy link

Illustrating with function highlighting in Github (which uses this package)

// A does not have a function body (implemented in assembly for example).
func A() int

// B is not highlighted correctly.
func B(a, b int) int { return a+b }
@lamg
Copy link

lamg commented Jan 15, 2019

The problem seems to be in some cases of functions signatures

type a func() (int, error)
type b func()
type c struct {}

It works when there is only one return value

type a func() int
type b func()

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