Open philippwiddra opened 10 years ago
Same here. This also breaks support for some of the .css themes as they look for '.hljs'-classed <pre> tags.
EDIT: I'll elaborate a bit more. I have just updated all the plugins for a docpad-generated website and docpad-plugin-highlightjs' update broke support for Highlight.js' solarized_dark (but also solarized_light) themes, even for their latest versions. This seems to be due to the <pre> tag missing the .hljs (which, I presume, used to be there in previous versions).
Adding the aforementioned class via dev console gets things back to normal.
If someone can submit a pull request for this, that would be amazing.
I'll have a look into it over the weekend. There seem to be two different issues at play: one is the default class being set to 'highlightjs' instead of 'hljs', which seems to be easily fixable, and the other is classes being overridden instead of appended to. I'll let you know asap. On Feb 7, 2014 12:29 AM, "Benjamin Arthur Lupton" notifications@github.com wrote:
If someone can submit a pull request for this, that would be amazing.
— Reply to this email directly or view it on GitHubhttps://github.com/docpad/docpad-plugin-highlightjs/issues/7#issuecomment-34387163 .
It appears to me that the plugin overrides other classes of the pre tag when generating.
Especially when using the bootstrap class
.pre-scrollable
it is a little annoying that all original classes are stripped off the<pre>
tag. Im not sure if this also applies to classes of the original<code>
tag.Example:
Should generate into:
But instead generates into:
If this is the intended behavior i apologize for bothering you, but if not it may be important for more people than me.