JavaScript string literals are not supported in code blocks
Any issue will be ignored if you don't provide the following detailed information.
Describe the bug If you create a code block with js string literals the '`'s are not properly formatted in the output. JS literals: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
Example code block:
console.log(`1 and 1 make 2`);
Output code block:
console.log(1 and 1 make 2);
To reproduce
Steps to reproduce the behavior:
- create a new post
- create a new javascript code block
- enter the line: console.log(
1 and 1 make 2); - publish
I have syntax highlighting by Prism.js enabled using coy theme. I have tried turning on/off various other settings and the bug still happens.
Expected behavior
Ideally literal strings would be correctly formatted including special formatting for expressions in the strings (See functionality listed here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals)
At minimum literal strings should be treated like regular strings.
Screenshots
Expected:

Actual:

Server environment
- WordPress version: 5.2.3
- WP Githuber MD plugin version: 1.11.8
User environment
- OS: Windows
- Browser: Firefox (also tested on Chrome)
I also encountered the same problem.
I will take a look at it. If there is any update, I will mention you here.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 2 days.
This issue was closed because it has been inactive for 14 days since being marked as stale.