Skip to content

Feature idea: code highlighting #1379

@giltho

Description

@giltho

Code highlighting is particularly helpful when you want to show some specific feature in the context of broader code. Take for instance this example in the Stripe documentation which shows an entire file with the relevant bit highlighted.

I'm not 100% sure how to achieve that in HTML, but possibly from the point of view of odoc it should look like the following to highlight lines 4 to 6:

{@ocaml highlight="4:6" [
...
]}

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