Created
December 9, 2018 13:31
-
-
Save ylxdzsw/2185dfdc9d9f5c047136ff00138be6b0 to your computer and use it in GitHub Desktop.
bundle KaTeX fonts into css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Base64 | |
write("katex.css", replace(read("katex.min.css", String), r"fonts/[^.]+\.woff2.*?}" => s -> "data:font/woff2;base64,$(base64encode(read(s[1:findfirst(x->x==')', s)-1]))))}")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment