-
Notifications
You must be signed in to change notification settings - Fork 2
Line highlight plugin #1
Comments
I see. |
Awesome! 💃 Looking forward
…On Sat, Apr 7, 2018 at 2:56 PM Cláudio Silva ***@***.***> wrote:
I see.
I thought a bit about this and the best way to implement it.
I came to the conclusion that the best way to avoid having to implement
specific features for each Prism plugin that requires them, would be to
create a generic mechanism that allows one to apply custom CSS classes and
HTML attributes to specific PRE elements, as that seems to be the way to
configure most plugins.
I'll see what I can do :-)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPVmO7DCi4MM4j7eabc2PCu67w46AH9ks5tmQvqgaJpZM4TKjvw>
.
|
@lorensr I've released a new version of the plugin. |
Thanks, that's the feedback I needed. Have you read this section of the Readme? There I explain how to make the
Here's how I see the plugin working on my book: The line numbers column from the Anyway, as I said on the Readme, "unfortunately, all of this only works if the user doesn't increase or decrease the text size when reading the book. This is a limitation of the line-highlight plugin that cannot be overcome" as it works in pixels only (not on A complete solution would require the original plugin to be forked and patched, or using another plugin, or applying the current plugin on the client-side (the browser) when the book is being viewed; but then, it would no longer work on PDFs. |
Thanks! Should I be adding to the styles to Also, are these warnings okay?
|
The styles I mentioned are just an example. You can set your custom styles by loading your own stylesheet using the As for the warning messages, no, they are not okay and probably that's what's causing the plugin to malfunction. I don't see those messages on my build. [...] Ok, I ran |
I haven't done any gitbook dev, but |
Sorry for the long delay. I was very busy. |
Now I'm getting a lot of the
|
Hi @lorensr |
Closing this as no feedback was given, so I guess this is solved. |
Hi @lorensr Take a look at this repository: gitbook-prism-ext-demo |
Sorry for the long delay. I forgot about this as we're not using this plugin any more. |
Nice package! I'm wondering whether it would be possible to use this plugin?
http://prismjs.com/plugins/line-highlight/
It would involve adding to the markdown parser to translate eg:
to:
The text was updated successfully, but these errors were encountered: