-
Notifications
You must be signed in to change notification settings - Fork 49
Number sign in path breaks highlighting #62
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
Comments
@omniomi is the squiggly from Script Analyzer? Or from something relating to editor syntax? |
@tylerl0706 it's from script analyzer. |
A solution: "commentLine", "begin" match:
(this captures the comment mark in group 1, a change made for a different issue) basically, any valid filename character. I am documenting the solutions I find for each issue so I do not lose track of them. This solution may contain other solutions to other issues, and it may not be fully tested yet. I implement them on my systems so as to improve my experience with VS Code. |
@msftrncs you could also submit PRs to keep track of solutions 😉 |
@msftrncs there's an unescaped Welcome to my hell ;) You cannot always assume there will be a space because PowerShell doesn't care and some people are heathens (I kid of course, but some people absolutely add comments without spaces.) |
@omniomi, do forward slashes (/) require escaping in regex? I figure there was something I was missing … I know it cannot rely on spaces, but forgot that the command processor has state (or mode) logic available to it and could still switch its processing at any boundary it chooses, unlike tmLanguage. Regex lookbehind will not be enough for that. So how many other places might I have missed? A possible solution to correct my 'possible' :) solution is to add regex for comment line to the end of every single variable and member. It requires renumbering all the captures, as capture 0 can no longer be used (where it was). BTW, I have already got the The only other item I found was I'd love to do PR's, but I am only working on my local copy VSCode's JSON language file. I've got to believe you guys do not actually edit that tmLanguage file with a text editor, but I couldn't find any tools quickly. |
Sorry, in PCRE they do... which is where my head was when I looked at it. In the tmLanguage file they do not.
Haha, I actually do edit the xml-plist file directly using VS Code then build it to json to test it. I was planning to write a script that could go the other direction so one could work in json and then build to xml-plist but It's surprisingly difficult and I haven't finished it. |
:) I was thinking about scripting such a conversion myself. I haven't gotten far enough to find out how difficult it is yet! |
See if this can be of any help regarding tmLanguage.JSON & tmLanguage |
When a number sign is part of a path, the highlighting breaks for everything on that line after the number sign.
Here's how it looks with a number sign:

And If I delete the number sign, it works again.

moved from: PowerShell/vscode-powershell#150
The text was updated successfully, but these errors were encountered: