Problem with highlighting code. #1359
Answered
by
fuma-nama
EricTsai83
asked this question in
Q&A
-
If my code looks like this, how can I highlight // ...
async function server(url) {
// ...
if (url === "/") {
const html = `<!doctype html>
<html>
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<script src="client.js"></script>
<button onclick="onClick()">Reveal Cat Name</button>
</body>
</html>
`;
return { content: html, contentType: "text/html" };
}
// ...
}
|
Beta Was this translation helpful? Give feedback.
Answered by
fuma-nama
Feb 2, 2025
Replies: 1 comment 1 reply
-
you need to add the Shiki transformers, via See https://shiki.style/packages/transformers, for your case it's |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
EricTsai83
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you need to add the Shiki transformers, via
transformers
option.See https://shiki.style/packages/transformers, for your case it's
transformerNotationHighlight