react-syntax-highlighter not beautifying code?

Viewed 605

I am using the package "react-syntax-highlighter" to beautify code in react project, but somehow it still doesn't work as expected. I tried to search similar issues, but couldn't found any solution. Below {codeString} is generated by using blockly (by google).

<SyntaxHighlighter language="javascript" style={docco} showLineNumbers>
      {codeString}
</SyntaxHighlighter>

enter image description here

1 Answers

a few things to consider:

enter image description here

Make sure backticks are gonna be on the left edge. do not tab it. and use the language shorthand right after the first ```js as above.

Related