You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For code blocks inside a custom tag, an extra indent is added to the final output.
eg:
html = `
<ms-code-block><pre> <code><span class="hljs-comment"># Our data from the previous step</span>
target_token_id = <span class="hljs-number">12</span>
y[target_token_id] = <span class="hljs-number">1</span>
</code></pre>
</ms-code-block>
`;
Expect:
```foo = bar```
Actual:
```
foo = bar
```
This leads to an invalid code block in markdown.
Note:
I tried to tweak the replacement function, but a lot of times it doesnt produce the output strictly.
It seems its later reformatted again.
The later reformat is somehow dependent on having leading space or not.
eg:
replacement: function (content, node, options) {
// adding NN or not here changes the later reformat ...
return 'NN\n\n' + fence + language + '\n' + code.replace(/\n$/, '') + '\n' + fence + '\n\n';
},
For code blocks inside a custom tag, an extra indent is added to the final output.
eg:
Expect:
Actual:
This leads to an invalid code block in markdown.
Note:
I tried to tweak the replacement function, but a lot of times it doesnt produce the output strictly.
It seems its later reformatted again.
The later reformat is somehow dependent on having leading space or not.
eg:
Note:
This is also related to the space gap I mention in
Fail to detect coding block when there is a space gap between
<pre> <code>. #498