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 · 2 comments
Open

output highlighting does not work for python chunk #18

shafayetShafee opened this issue May 29, 2023 · 2 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")
```
@hopezh
Copy link

hopezh commented Dec 19, 2024

May I ask if this issue has been resolved?

I was about to put up a post when I came across this issue for the output of python code block in my qmd file just now...

@shafayetShafee
Copy link
Owner Author

shafayetShafee commented Dec 22, 2024

@hopezh, Unfortunately, no! the issue still persists. But you may try this way.

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

2 participants