简体   繁体   中英

Putting an html escape character inside a markdown code block

Is there a way to put an escape character from html inside a codeblock in markdown? Specifically, I was hoping to a no line-break space character,   , inside a code block to create a space separated number that wouldn't get cut into multiple lines. I don't think it affects anything, but this is for the stackedit flavor of markdown.

Currently, stackedit renders 1 000 exactly the same as Stack Overflow, with the html escape character being copied instead of rendered.

No, code-blocks are generally rendered as verbatim blocks.

If you want to achieve the equivalent effect, you'll need to hand craft the html and embed your code sample as that instead. (shouldn't be too hard - just look at a rendered block of markdown code to get the layout).

For instance, stack simply strips the leading spaces then wraps it in a <pre><code>...</code></pre> block.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM