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

Show invisibles: changed color #1607

Merged
merged 1 commit into from
Nov 12, 2018
Merged

Conversation

RunDevelopment
Copy link
Member

This PR changes the color of the placeholders of invisible characters.
They will now use the default text color of the theme as the base and blend in instead of a fixed color for all themes.

(I also used tabs for indentation.)

Before

Default:
image

Tomorrow night:
image

After

Default:
image

Tomorrow night:
image

@mAAdhaTTah
Copy link
Member

Love this. I always thought the dark theme dots were too bright.

@mAAdhaTTah mAAdhaTTah merged commit 2ba6226 into PrismJS:master Nov 12, 2018
@RunDevelopment RunDevelopment deleted the si-color branch November 12, 2018 17:02
mAAdhaTTah pushed a commit that referenced this pull request Jan 23, 2019
This PR fixes #1608.

The patterns for invisible characters (ICs) are now also recursively added to the `inside` of every pattern.

I also had to change the color of ICs because in #1607 I changed the color to `inherit` which causes the ICs to have different colors depending on which token they are inside of.
So, to make everything consistent, I changed the color to grey (`rgb(128, 128, 128)`) and made it half transparent so it would blend in. Looks really similar to #1607.

---

Most of the code is just traversing the language definition, handling the different kinds of tokens (simple regex, array, pattern object), and trying not to fall because of the added tokens for ICs and the `rest` property.
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.

None yet

2 participants