簡體   English   中英

Markdown:將 html 顯示為代碼示例,而不將其轉換為 html 布局

[英]Markdown: show html as code example without it being converted to html layout

我從幾個例子開始這個問題,但由於我不知道答案,所以發布這篇文章是一場噩夢。 每次我嘗試發布它時,它都會抱怨代碼格式不正確。

但是:問題是; 如何在 markdown 環境中使 HTML 未正確格式化,甚至未全部格式化; 就像純文本一樣。 我只想在 markdown 中說以下句子:“請小心使用 hello”,其中“hello”在 html 元素內。

我想查看 html 元素(是的,你剛才錯過了 div 元素。我可以向你保證。我真的需要一種方法來查看包裹在“hello”周圍的 div 元素。而不僅僅是 hello你已經可以看到了。)

那么,有沒有辦法在 Markdown 中將 html 元素作為 html-elements-as-normal-plain-text 讀取,而不是將它們轉換為 html-layout? 我需要給出幾個簡單的說明,說明在自述文件中放置哪些 html 元素。

Please be careful to use <div style="display:block">hello</div>

縮進四個空格(或制表符)。 或者,某些實現允許您將代碼放在三個反引號“```”之間。 您可以在此處將語法突出顯示的語言指定為“```html”。

Please be careful to use <div style="display:block">hello</div>

或者內聯代碼段的反引號: Please be careful to use <div style="display:block">hello</div>

參考:

暫無
暫無

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

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