Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Support configurable class names #941

Closed

Description

@galaxy4public

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.

Activity

  1. waylan commented on Apr 15, 2020

    @waylan
    Member

    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.

  2. added
    confirmed
    extension
    feature
    someday-maybe
    on Apr 15, 2020
  3. waylan commented on Jun 30, 2020

    @waylan
    Member

    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.

  4. removed
    someday-maybe
    on Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedextensionfeature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions