leeoniya / reMarked.js

client-side HTML > markdown
http://leeoniya.github.io/reMarked.js/
396 stars 97 forks source link

regression: <b> and <i> dropped during unsup_tags rework #29

Closed ghost closed 10 years ago

ghost commented 10 years ago

HI leeoniya,

This is not really an issue just a question. The documentation of remarked states that we can add custom symbols for markdown and pass it as options when invoking remarked for the first time.

I wanted to use ? or any other symbol as an emphasis instead of _ . So I passed it in the config variable but nothing seems to happen. Is this a bug or am I doing it wrong.

Thanks.

leeoniya commented 10 years ago

working okay for me.

var opts = {
    emph_char:  "?",
};

var reMarker = new reMarked(opts);

var markdown = reMarker.render("<em>test me</em>");

console.log(markdown);

you can test it in console on the demo page: http://leeoniya.github.io/reMarked.js/

it doesn't work with <i>, though. is that what you're referring to?

ghost commented 10 years ago

Ah yes thank you for the reply. It was a mistake on my end.

Apologies.

leeoniya commented 10 years ago

you're right, this is a regression that happened after reworking how unsupported tags were handled. i had them lined up to get reworked also but must have forgotten: https://github.com/leeoniya/reMarked.js/blob/master/reMarked.js#L46

i'll patch this later today.