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

Add cairo support to highlight.js #2468

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wawel37
Copy link

@wawel37 wawel37 commented Nov 6, 2024

Hello!

We wanted to support a cairo inside the highlight.js. We use mdBook inside our build / package manager tool called Scarb, which has an option to generate markdown files with documentation and later be used by mdBook to generate a proper documentation html.

@ehuss
Copy link
Contributor

ehuss commented Nov 6, 2024

Can you say how you generated this? I do not see cairo as a supported language in highlight.js 10.1. If it isn't one of the built-in languages, I don't think I would want to include it. I think you should be able to include it as a js extension.

@wawel37
Copy link
Author

wawel37 commented Nov 7, 2024

Can you say how you generated this? I do not see cairo as a supported language in highlight.js 10.1. If it isn't one of the built-in languages, I don't think I would want to include it. I think you should be able to include it as a js extension.

Tbh, I just manually modified the rust rule in the minified highlight.js, as cairo is based upon rust.

I am fully aware that we can include our own JS extension with the mdBook result, and that's what we are actually doing right now. And it works. But the problem is that we don't actually run a mdBook for a user, so later on, the user has to replace the highlight.js himself. We wanted mdBook to support the cairo out of the box.

I also completely understand your concern. I will go and make a PR inside the highlight.js with cairo support, and later on come back here :)

@ehuss
Copy link
Contributor

ehuss commented Nov 7, 2024

I will go and make a PR inside the highlight.js with cairo support, and later on come back here :)

Unfortunately that won't help for now, since we are stuck on an old version of highlight.js and can't update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: waiting on a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants