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
docs: match code syntax highlighting from the default theme #3883
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was long needed - thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just a little white space cleanup is needed.
HelpSource/lang-sc.js
Outdated
[PR.PR_ATTRIB_NAME, /^\\\w+/], | ||
[PR.PR_ATTRIB_NAME, /^'[^']+'/], | ||
[PR.PR_ATTRIB_NAME, /^\w+\:/], | ||
[PR.PR_ATTRIB_NAME, /^\$(\\)?./], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove the extra white space here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, done! i force-pushed the change, maybe not the way to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can push a new commit to your remote topic/docs-syntax-hi
branch and it will be added to this PR. No force pushing required. We have the option of squashing a PR to keep the commit history clean when merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickdupuis i already did a push -f overwriting this commit with the change, so it can be used for a merge.
syntax highlighting for code in the help/docs is different (but confusingly similar) from the default theme in the editor. for consistency, colors and font weights are adjusted to be the same.
before:
after:
the careful eye will notice that the editor has slightly lighter tone than the docs.
i wasn't able to translate that from qt into css, but if it's significant i might do it.
the default theme: https://github.com/supercollider/supercollider/blob/develop/editors/sc-ide/core/settings/theme.cpp#L101. testing the docs theme: https://github.com/supercollider/supercollider/blob/develop/HelpSource/syntax_colors.html