Skip to content

Line highlight support in static code blocks #500

@JanSimek

Description

@JanSimek

Inspired by: https://retype.com/components/code-block/#line-highlighting

Highlight a specific line or range of lines in a code block component using the line highlighting syntax.

After the opening of a code block component, add a space and then start your line highlighting configuration with a # character. For instance, to highlight the first line, use #1.

```java #3-4
public void hello() {
    System.out.println("NOT highlighted");
    System.out.println("This line is highlighted!");
    System.out.println("This line is highlighted!");
    System.out.println("NOT highlighted");
}
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions