Skip to content

Highlighting code #11

Open
Open
@kcarnold

Description

@kcarnold

Has anyone gotten this working for marking up parts of code on slides somehow?

It's tricky because you can't easily add CSS spans to code blocks.

Maybe someone has figured out a way to use existing tooling to do this. But if not, here are some ideas I've had, none of them fleshed out enough:

Special comment for line below

# rn: print(...)
print("Hello")

Special comment for current line

print("Hello") # rn:"Hello"

or # rn:\"H.*o\" (regex)

cell option

```{.python .rn="\"Hello\""}

or

```{python}
#| rn: "Hello"
print("Hello"
```

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