-
Notifications
You must be signed in to change notification settings - Fork 523
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
Prism syntax highlighting should support specific lines #628
Comments
Also, whatever Prism does when you using the "lazy way" in the browser, can we get to that in Node instead of having to manually mess around with |
Another problem is HTML like this: <pre class="brush: css no-line-numbers"> which is different from: <pre class="brush: css"> It looks like this is not possible in Prism, from Node! |
Getting Prism to work on the server is clearly hard and outright painful. There's evidence that the Prism library is not working very well in Node. Basics work, as clearly demonstrated in the current Yari prototype, but anything beyond that is all about doing in the web. With all that's going on, I think we should abandon hope to do syntax highlighting in the server (build) and move it back to the client. Like Kuma does. It has the advantage that we don't need to solve the problem about line-numbers or non-trivial lexers in Node yet. And in terms of performance, as demonstrated here being able to SSR the syntax highlighting isn't a huge sell on your Lighthouse score. |
Note-to-self; The way we do Prism with Node means we're failing on a bunch of languages. First of all, it might be interesting to see what we can learn from https://github.com/benjycui/node-prismjs and how it does things. Second, made a complete build (of folder search
|
I don't even like line numbers. It might make sense if there's text underneath that needs to say something like But here, for example, it's of no use: To a reader, that just adds noise. |
This is supposedly how you're supposed to do it but it's not working. I'm tempted to boldly decide that line-number is a think that's just going to have to wait. Also, there's bigger fish to fry. Every |
In http://localhost:3000/en-US/docs/Web/API/Canvas_API/Tutorial/Transformations you'll find,
This is what it should look like: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Transformations
The text was updated successfully, but these errors were encountered: