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

Support annotations in type and function definitions #9

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

ergl
Copy link
Member

@ergl ergl commented Mar 24, 2022

Related to ponylang/pony-tutorial#495, this should fix the syntax highlighting issues for Pony code in Github when using the \nodoc\ annotation.

One caveat of the proposed solution is that it doesn't support multiple annotations, like so:

class \nodoc, nosupertype\ Foo

I didn't find an easy way to write a regular expression that matches a comma-separated list without using capture groups, which doesn't seem to be supported by Sublime's regex engine.

@SeanTAllen
Copy link
Member

How does this fix in GitHub? This is the sublime extension.

@ergl
Copy link
Member Author

ergl commented Mar 24, 2022

@SeanTAllen The list of language grammars that Github uses for syntax highlighting is here: https://github.com/github/linguist/blob/master/vendor/README.md

You can see that for Pony they're using https://github.com/CausalityLtd/sublime-pony, which redirects here.

@SeanTAllen
Copy link
Member

Well how about that.

@SeanTAllen SeanTAllen added the discuss during sync Should be discussed during an upcoming sync label Mar 24, 2022
@SeanTAllen
Copy link
Member

Seems like a reasonable improvement.

@SeanTAllen SeanTAllen merged commit 87ee9ec into ponylang:main Mar 24, 2022
@ponylang-main ponylang-main removed the discuss during sync Should be discussed during an upcoming sync label Mar 24, 2022
@ergl ergl deleted the annotations branch March 24, 2022 22:25
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

Successfully merging this pull request may close these issues.

3 participants