Skip to content

How to add line-highlight for jsx code block? #12975

Answered by cderv
hopezh asked this question in Q&A
Discussion options

You must be logged in to vote

First, you did not specify it, but I do believe you are referring to this community-contributed extension, right ? https://github.com/shafayetShafee/line-highlight

This would have been helpful to mention it, as you are asking in Quarto repo and not in the extension own repo. This would have been the place to ask for help.

Anyhow, here in the screenshot you shared, you are using

  • Non computation code cell (i.e Code Block with a class ```{.jsx})
  • but you are also using in-cell comment syntax to pass option to computation cell. (i.e #| source-line-numbers: 1-3)

Those two don't work together, and this is why the option is not taken into account.

Please do read their documentation on how to us…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@cderv
Comment options

Comment options

You must be logged in to vote
2 replies
@hopezh
Comment options

@mcanouil
Comment options

Answer selected by mcanouil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
themes Related to HTML theming or any other style related issue (like highlight-style)
3 participants