Skip to content

Line numbers for code #181

@mheistermann

Description

@mheistermann

How can I render code snippets with line numbers?

Our slides used to use .line-numbers, that functionality was removed in 012f6e67, where the commit message refers to using .numberLines, which doesn't work for me.

The highlightjs-line-numbers plugin we use checks for data-line-numbers on <code> tags, but if i start my code blocks with {.c line-numbers="1-4"}, the data-line-numbers is added to an outer <pre> element, not the inner <code> element.

Is this a bug and one of these ways should work, or is there some less obvious way to enable this?

(This may be related to #4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions