Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

output highlighting does not work for python chunk #18

Open
shafayetShafee opened this issue May 29, 2023 · 0 comments
Open

output highlighting does not work for python chunk #18

shafayetShafee opened this issue May 29, 2023 · 0 comments

Comments

@shafayetShafee
Copy link
Owner

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")
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant