mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-19 19:22:28 +02:00
I want to be able to tweak the default tokenizer for syntax highlighting. The current one isn't as good as it could be. With this PR, I would be able to add this to the siteConfig and it would give me the Prism access so that I can get proper syntax highlighting: ```js prism: function(Prism) { Prism.languages.javascript = Prism.languages.extend("javascript", { keyword: /\b(alias|as|async|await|base class|...|with)\b/, constant: /\b[A-Z][a-zA-Z0-9_]*\b/, builtin: /\bopen_file|...|invariant_violation|invariant|getcwd\b/, function: /\b[_$a-z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/, }); }, ``` |
||
---|---|---|
.. | ||
feed.js | ||
generate.js | ||
readCategories.js | ||
readMetadata.js | ||
server.js | ||
sitemap.js | ||
translate-plugin.js | ||
translate.js | ||
translation.js | ||
versionFallback.js |