Skip to content

Mark prompts differently in terminal/console blocks #68

Closed
@javiereguiluz

Description

@javiereguiluz

code-block:: terminal is highlighted like this:

image

We need the "prompt" ($ in Linux and macOS and C:\> in Windows) to be marked differently. This way we can apply different CSS styles to it and make it non-selectable by users (important when copying commands).

Today we do this using some ugly JS/CSS hacks ... but thanks to the new RST parser we could do this in PHP while building docs. It's similar to this -> https://github.com/weaverryan/docs-builder/pull/41/files

We could use hljs-prompt as the CSS class of this new element. Any volunteer to take care of this? Thanks!

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