Conversation
| html = html.replace(/>.*/g, (str) => { | ||
| str = str.replace(/^>(\s)?(?!<\/span>)/, ''); | ||
| return str; | ||
| }).trimRight(); |
There was a problem hiding this comment.
this is a workaround to remove unnecessary new line from
>```
| // https://github.com/hexojs/hexo/issues/2969 | ||
| if (lang !== 'cmd' && lang !== 'dos') { | ||
| html = html.replace(/>.*/g, (str) => { | ||
| str = str.replace(/^>(\s)?(?!<\/span>)/, ''); |
There was a problem hiding this comment.
<span> exclusion is a workaround to be compatible with sublanguage highlight.
|
In regards to https://github.com/hexojs/hexo-util/issues/108, it may be more suitable to put this workaround in backtick_code_block.js, but currently I'm not sure how well prism/atom handle blockquote. If later we find prism/atom cannot handle blockquote, then this workaround shall be moved to hexo. |
|
I think a workaround in the hexo (backtick_code_block.js) might be better I found examples of markdown notation in the GitHub Help: There are many examples which current As shown in Example 229, I'm trying to improve |
|
Superseded by hexojs/hexo#3765. |
Currently, when inserting a codeblock inside a blockquote, e.g.
results in,
Expected behavior is
This fixes hexojs/hexo#2969 & hexojs/hexo#3318.
However, this fix doesn't apply to
cmdordoscodeblock because the line may start with>, e.g.cmd codeblock in blockquote,
would result in,
A workaround is to remove
>from the closing backtick,https://pastebin.com/s94kaD4j
which should render as,
or use
{% blockquote %}tag plugin.