Skip to content

Is there any way to focus lines of code without shifting the code block? #120

Open
@rbalicki2

Description

@rbalicki2

Let's say I have two pages with the same code block containing two lines, and I'd like to emphasize line 1 on page 1 and line 2 on page 2. If I do that currently, the code shifts by about a line between slides, so that the emphasized line is in the middle.

Is there any way to avoid that layout shift?

What I'm currently doing is adding empty lines to the code block, which are always emphasized, e.g.:

three backticks jsx 1,2,4

1 # this is line 2, and is the only line I'm "actually" emphasizing
2

three backticks

But this requires me to disable formatting on save :/

Is there a more idiomatic way to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions