mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 05:03:43 +08:00
c052df412a
We were only supporting the main name of each HighlightJS language. So, by default, you could not use `js` or `jsx` to highlight Javascript, given they are aliases for `javascript`. This PR adds a list of aliases as a constant to core (built via a rake task), and then checks against the `highlighted_languages` site settings plus the list of aliases when processing a code block. |
||
---|---|---|
.. | ||
anchor.js | ||
bbcode-block.js | ||
bbcode-inline.js | ||
category-hashtag.js | ||
censored.js | ||
code.js | ||
custom-typographer-replacements.js | ||
d-wrap.js | ||
emoji.js | ||
hashtag-autocomplete.js | ||
helpers.js | ||
html-img.js | ||
image-controls.js | ||
mentions.js | ||
newline.js | ||
onebox.js | ||
paragraph.js | ||
quotes.js | ||
table.js | ||
text-post-process.js | ||
upload-protocol.js | ||
watched-words.js |