treehouse
treehouse copied to clipboard
explicit language for code blocks
The syntax highlighter currently used for highlighting and language detection is not accurate enough to get in the way of running code, which needs accurate language detection. We should in the short term support explicit user selected language for code block components.
Since we have limited user input mechanisms for component data, the easiest to implement and most familiar way to specify a language would be code fencing syntax. If you type in a node three backticks followed by a language name, hitting return should add the code block component and set the language. It should then not autodetect/change the language.