Markdown – Do you set the language on code blocks?
Last updated by Brook Jeynes [SSW] 8 months ago.See historyYou should have a syntax highlighter to show pieces of code on your pages for a better readability.
Examples:
See this json file for all supported languages and their aliases we can use in SSW Rules.
let iceCream = 'chocolate';
if (iceCream === 'chocolate') {
alert('Yay, I love chocolate ice cream!');
} else {
alert('Awwww, but chocolate is my favorite...');
}
Figure: Bad example - No syntax highlighting
let iceCream = 'chocolate';
if (iceCream === 'chocolate') {
alert('Yay, I love chocolate ice cream!');
} else {
alert('Awwww, but chocolate is my favorite...');
}
Figure: Good example - This JavaScript code block shows its syntax highlighted
Love it
0
Agree
0
Disagree
0
No way
0