簡體   English   中英

為塊禁用 Markdown

[英]Disable Markdown for a block

Markdown 語法往往方便寫博客和評論;

但有時當您想編寫一個簡單的 html 時,它會干擾內容

是否有標簽/語法要求 markdown 忽略該部分,如pre html 標簽?

如果預工作,如果 markdown 部件需要包含 html 標簽怎么辦?

The original implementation of Markdown (by Gruber) and PHP Markdown don't format inside block-level HTML elements, so you can use <div> , for example:

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.

將呈現為:

<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>

至少在 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.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM