You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My blog is generated by Pelican which uses CodeHilite to parse and decorate the code blocks. Additionally to this I am using PrismJS to do the actual highlighting of the decorated code blocks.
One thing makes me sad, though, is that CodeHighlite uses linenums for denoting when line numbers were requested. At the same time PrismJS expects line-numbers.
It would be really useful to be able to customise the class name assigned for line numbering since it would make it possible to use other highlighters without forking their code.
Codehilite uses linenums because Codehilite relies on Pygments for doing the code highlighting and Pygments uses linenums. For that matter, both Pygments and Codehilite have been around for years before PrismJS. Seems to me that PrismJS is the one which should change.
That said, making these sorts of things configurable is a reasonable solution as it promotes interoperability. A PR is welcome.
The work in #816, which will be available in the next release (3.3), permits any random class to be assigned to a code block. That addresses this issue completely, Therefore I am closing this.
Activity
waylan commentedon Apr 15, 2020
Codehilite uses
linenumsbecause Codehilite relies on Pygments for doing the code highlighting and Pygments useslinenums. For that matter, both Pygments and Codehilite have been around for years before PrismJS. Seems to me that PrismJS is the one which should change.That said, making these sorts of things configurable is a reasonable solution as it promotes interoperability. A PR is welcome.
waylan commentedon Jun 30, 2020
The work in #816, which will be available in the next release (3.3), permits any random class to be assigned to a code block. That addresses this issue completely, Therefore I am closing this.