-
Notifications
You must be signed in to change notification settings - Fork 654
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
Syntax themes: .pl-s/.pl-s1 description and usage no longer match #256
Comments
Got a example? |
I guess this one is simple enough. print('This here is a string.') |
If you look at this demo, it looks like most of the examples are highlighting strings as green. The only time I noticed the string is not green are in the HTTP, JSON and Nginx examples. If you want to submit a custom theme, I would be happy to include it. |
This isn't an issue with the themes themselves, rather, it's an issue with selecting elements incorrectly. |
GitHub uses a custom syntax highlighter so we don't have control over that... To get the comments for the class names, I had to email them directly and that's how they labeled that selector (ref). I'm not saying we're not going to change anything. I just don't see where the purple strings are showing up and what changes you are requesting. Maybe submit a pull request so we have a better idea? |
Hmm, ok I actually changed my theme to Tomorrow Night and I am seeing the purple strings now... odd that the demo is different. |
Guess GitHub might've changed the classes on us. It wouldn't be the first time. Could we contact them and see what else has changed since then? JS: console.log("Hello, World!"); bash: echo "Say $(echo 'Hello World!')." |
Yeah, if you look at #197, you'll see they used to have strings named as sigh I don't have a lot of time to work on this today, but I'll start with updating the |
Another change I noticed while updating the demo is that the class name of the language has changed. It used to add Also, so far, the following language class names were changed:
|
Sounds like the |
Hmm. I found a case where $ echo 'Hello, World!'
Hello, World!
$ cat file.txt
This is a random file. Here is the grammar file for it. I'm guessing |
Guess it is. Here's some more Test 1:
\begin{code}
module Main where
main = putStrLn "Hello, World!"
\end{code}
Test 2:
> module Main where
>
> main = putStrLn "Hello, World!"
|
FYI, here's another old reference mapping of scopes to CSS class names. |
Thanks for the update... I'll try to find some time this weekend to work on a fix. |
I found sindresorhus/github-markdown-css today. The commit history might be interesting/useful. |
Hmm, well after looking at everything, the only thing I can come up with is to just set |
I wouldn't do that. |
I concur with @silverwind. I'm not particularly fond of random source code being highlighted like strings. However, if we do this, we should also be aware of the fact that shell session output ( After some investigation, there is one place where puts "#{x} #{y.infinite ? 'TOO LARGE' : y}" or JavaScript: console.log(`Hello, ${name}. This is the ${console}. Testing raw strings:`,
String.raw`a\b\n`); |
Looks like sindresorhus/github-markdown-css@1f877b6 is when the |
At this point in time, I would suggest changing |
I just updated the It does not include a Maybe, after I get back from my vacation, we can clean up the syntax themes by removing those extra definitions. |
Thats some long vacation :) |
Perpetual vacation. |
Thats called death :) |
Is this something we can fix or what? |
I think the sensible thing to do forward would be to use the primer syntax theme output linked above (which, side note, was updated to include a carriage-return scope) as a template for all the syntax themes. Should also go through and remove rules for scopes that have been removed too. |
Ive updated the Github syntax theme a while back now, its needing a cleanup fro unused values, help welcome. In fact All styles need some cleanup and consistency fixes besides what I already done. |
The syntax highlighting themes template describes
.pl-s
assupport
. However, from what I can see, it should actually bestring
. This has caused strings to be highlighted as the wrong colour in rendered code views; for example, the Tomorrow Night themes highlight strings as purple rather than green.The text was updated successfully, but these errors were encountered: