rust-lang / rust-by-example

Learn Rust with examples (Live code editor included)
https://doc.rust-lang.org/stable/rust-by-example/
Apache License 2.0
7.06k stars 1.35k forks source link

code syntax highlighting #1558

Open alexguja opened 2 years ago

alexguja commented 2 years ago

It seems like changing the theme of the site doesn't have much effect on the code syntax highlight. For instance, when selecting the Ayu theme, the code theme defaults to a different theme.

See below. It seems like the code theme is Coal, but it should be Ayu.

example
marioidival commented 2 years ago

Hello, feel free to help us open a PR to that! ❤️

alexguja commented 2 years ago

Hey Mario,

I did some digging and it seems like the issue comes from this line in mdBook

ace_theme = "ace/theme/tomorrow_night"; should probably say ace_theme = "ace/theme/ayu_highlight";

However, it seems like the ayu theme is missing from the ace themes

For reference, I found a related issue in the mdBook repo

I am not entirely sure how mdBook works just yet, so if nobody beats me to it I'll try to open a PR