禁用块的Markdown

Lak*_*sad 15 html markdown plugins coding-style

Markdown语法通常可以方便地编写博客和评论;

但有时候当你想写一个简单的html时它会干扰内容

是否有标记/语法要求markdown忽略该部分,如prehtml标记?

如果预先工作,如果降价部分需要包含html标签怎么办?

Can*_*der 15

Markdown(由Gruber提供)和PHP Markdown的原始实现不会在块级HTML元素中进行格式化,因此您可以使用<div>,例如:

Markdown text.

More markdown text.

<div>
Markdown ignores inside the div, you can do all sorts of crazy stuff:
<a href="http://www.stackoverflow.com">Stack Overflow</a>.
<blink>Is blink still supported?</blink>
</div>

Yet more markdown text.
Run Code Online (Sandbox Code Playgroud)

将呈现为:

<p>Markdown text.</p>

<p>More markdown text.</p>

<div>
Markdown ignores inside the div, you can do all sorts of crazy stuff:
<a href="http://www.stackoverflow.com">Stack Overflow</a>.
<blink>Is blink still supported?</blink>
</div>

<p>Yet more markdown text.</p>
Run Code Online (Sandbox Code Playgroud)


unw*_*ind 5

至少在Stack Overflow上,... <pre>HTML标签可以很好地用于此目的.它还像浏览器一样格式化您的文本:

This is pre-formatted, so in here I can /slash/ and *star* stuff
without issues, and [[square brackets]] [are] just brackets.

  • 此外,对于较大格式区域内的较短片段,请使用反引号 (`)。 (2认同)