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

Program arguments not yellow after /// #19

Closed
peterhickmanj opened this issue Sep 30, 2017 · 2 comments
Closed

Program arguments not yellow after /// #19

peterhickmanj opened this issue Sep 30, 2017 · 2 comments

Comments

@peterhickmanj
Copy link

Sometimes people list arguments for a program after ///, which allows you to quickly explain the argument after the ///. The package does not highlight these arguments yellow.
issue1

@kylebarron
Copy link
Owner

This may be impossible to fix. The program applies tags to text inside the syntax command, but that's currently set as starting with syntax and ending with a newline. Ideally, to have this environment wrap over multiple lines, you'd want the environment to only end on a line that doesn't have a ///. But to do that, I think you'd need something like (?<!///[^\\n]+)\\n, i.e. the environment wouldn't end if it saw /// then any amount of text and then the end of the line.

However the regex engine that Atom uses doesn't allow look-behinds to be of variable length. There's no way to do this without having a regex match of variable length, because I don't know how much text would occur after the ///.

@kylebarron
Copy link
Owner

Success!

I realized that you could say begin with syntax and end with a newline \n, and then if you have comments inside that start with /// and end with a newline \n, then any comment will 'push' the end of the environment to the next line!

I'm super happy I figured this out. This will go out in an update sometime today.

image

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