showdownjs / showdown

A bidirectional Markdown to HTML to Markdown converter written in Javascript
http://www.showdownjs.com/
MIT License
14.32k stars 1.57k forks source link

ghCodeBlocks set to false but keeps rendering <code> and <pre> tags #996

Open TunaFFish opened 9 months ago

TunaFFish commented 9 months ago

So I set both global and local:

showdown.setOption('ghCodeBlocks', false); // global
const converter = new showdown.Converter({ ghCodeBlocks: false }); // local
console.log('global ghCodeBlocks: ' + showdown.getOption('ghCodeBlocks'));
console.log('local ghCodeBlocks: ' + converter.getOption('ghCodeBlocks'));

in the console:

global ghCodeBlocks: false
local ghCodeBlocks: false

in markdown when I write:

Hello ```cool``` World

I get in HTML:

Hello <code>cool</code> World

Why are the backticks converted? I have the option set to false.. Am I missing something? My version is v 2.1.0