-
Notifications
You must be signed in to change notification settings - Fork 704
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
Improve formatting of ${...}
#1108
Comments
Maybe this could be fixed by adding some regex to For example, this regex[1][2] matches things like
Could we add similar regex somewhere in [1]: Adapted from here: https://github.com/Dart-Code/Dart-Code/blob/06eaf66e9613b16e1401dd267c5597dff1524239/syntaxes/dart.json#L328. |
I believe this would require a PR to https://github.com/google/code-prettify, but I could test the fix locally first. @chalin how does this solution sound to you? |
@smolck - the Dart Code reference is a good find! @kwalrath - I agree that any updates should be submitted as a PR over https://github.com/google/code-prettify. I see that googlearchive/code-prettify#592 hasn't been merged yet. Could we ping someone to ensure that progress is made? Oh, we've already made local changes to vendor files -- e.g., #1624! Not what I prefer (since local changes like these run the risk of being overwritten), but it's good that I'm aware of it now.
|
@mkustermann pointed out that code inside of
${...}
is formatted like the rest of the string. It'd be good to format it like real code. E.g. in www.dartlang.org/articles/dart-vm/io#file-system-access, the print statement in the first code snippet looks something like this:That
await
code (if outside of the string) would look like this:This is probably a prettify issue, but it'd be really nice to fix it.
The text was updated successfully, but these errors were encountered: