-
Notifications
You must be signed in to change notification settings - Fork 1
codeblocks have syntax highlighting #1
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
base: main
Are you sure you want to change the base?
Conversation
|
allowing style and class attributes seems like a pretty bad idea, we should probably be sanitizing it first, then parse it as shiki, no? |
JustTemmie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seem fine to me, waiting for a review from @SauceyRed too
| }); | ||
|
|
||
| doc = parser.parseFromString(sanitized.value, 'text/html'); | ||
| // how do you zip a list? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (language, codeblock) in zip(languages, doc.queryselectorall('code'))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the zip supposed to be doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iterates both at the same time, i.e
let i = 0;
for i in 0..languages.len() {
let (language, codeblock) = (languages[i], codeblocks[i])
}| "pinia": "^3.0.2", | ||
| "pinia-plugin-persistedstate": "^4.2.0", | ||
| "shiki": "^3.8.1", | ||
| "tm-themes": "^1.10.7", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is, it provides the gruvbox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah


seems to work