alexwforsythe / code-blocks

Syntax highlighting for Google Docs
https://www.alexwforsythe.com/code-blocks/
MIT License
701 stars 89 forks source link

Valid ES6 code breaks formatting #91

Closed thilak-rao closed 4 years ago

thilak-rao commented 6 years ago

When I try to format this ES6 code using code blocks addon, it breaks formatting.

Language used: JavaScript; Theme: Dracula.

function isEqual(value, compare = 10/2) {
    console.log(value); // output: 5
    console.log(compare); // output: 5
    return value == compare;
}

console.log(isEqual(5)); // output: true

Screenshot: https://imgur.com/a/gec3YEt

alexwforsythe commented 4 years ago

From the README:

Code Blocks is built with highlight.js and can only provide syntax highlighting for languages that are supported by that library.

If you'd like to see Code Blocks support a language that is not yet implemented by highlight.js, please refer to their page on requesting new languages.