-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Syntax highlighting is provided by Skylighting (via Pandoc), see https://github.com/jgm/skylighting The availability depends on the syntax existing in KDE, various upstream updates, and Quarto. Accessibility: To improve accessibility, please add alternative text to your screenshots. This helps all users, including those using screen readers, to understand the context of the images. A brief description can make a big difference! See Good Alt Text, Bad Alt Text — Making Your Content Perceivable. For accessibility, prefer sharing code as text rather than screenshot which make it unusable by everyone. |
Beta Was this translation helpful? Give feedback.
-
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
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 use on fenced code block: https://github.com/shafayetShafee/line-highlight/tree/main?tab=readme-ov-file#highlighting-on-markdown-formatted-codeblocks
Here is an example ---
title: My title
format: html
filters:
- line-highlight
---
```{.jsx filename="index.jsx" source-line-numbers="1-3"}
function formatName(user) {
return user.firstName + ' ' + user.lastName;
}
const user = {
firstName: 'Harper',
lastName: 'Perez'
};
const element = (
<h1>
Hello, {formatName(user)}!
</h1>
);
```
Hope it helps. For next time, please to try to take time giving full information and helpful details to help us help you. Thanks ! |
Beta Was this translation helpful? Give feedback.
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
```{.jsx}
)#| 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…