Skip to content

output highlighting does not work for python chunk #18

@shafayetShafee

Description

@shafayetShafee

The main reason is class-output is not a option for python chunk.

Consider this example,

---
title: "line highlighting"
format: html
filters:
  - line-highlight
---

```{python}
#| message: false
#| source-line-numbers: "1,4"
#| class-output: numberLines highlight
#| output-line-numbers: "2"

test = [1, 2, 3, 4]

for i in test:
  if i%2 == 0:
    print("this line is highlighted")
  else:
    print("this line is not highlighted")
```

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