$convertFromMarkdownString and an empty transformer list, CODE blocks are still converted
$convertFromMarkdownString does not emit <code> tags wrapped in <pre> as it usually done for preformatted code blocks. If nothing else this is useful to distinguish inline code from block code.
Lexical version: 0.12.5
Steps To Reproduce
- Use
$convertFromMarkdownString with a transformers argument as an empty array or with e.g. QUOTE
$convertFromMarkdownString("this is text\n> this is a quote\n```c\nint main(int argv, char **argv)\n{\n return -1;\n}\n```\n> this is a quote", [QUOTE])
- Observe forced transformations on code blocks
If an empty transformer array is given then no QUOTE transformations occur as expected, but CODE transforms still do.
Link to code example: https://codesandbox.io/p/sandbox/awesome-goldberg-vgj4s2
The current behavior
- The function
$convertFromMarkdownString implicitly transforms CODE blocks with internal logic despite passing no CODE transformer that would otherwise match the blocks.
<code> tags are not wrapped in <pre> tags
The expected behavior
- Calling
$convertFromMarkdownString with an empty array of transformers should effectively be a no-op.
<code> tags are wrapped in <pre> tags, or at least conditionally through some config