# div 标签后的文本无法正确渲染

**URL:** https://meta.discourse.org/t/text-after-div-tags-does-not-get-rendered-properly/407858
**Category:** Support
**Tags:** composer
**Created:** [2026年七月17日 04:27 UTC](https://meta.discourse.org/t/text-after-div-tags-does-not-get-rendered-properly/407858 "2026-07-17T04:27:41Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [2026年七月17日 06:28 UTC](https://meta.discourse.org/t/text-after-div-tags-does-not-get-rendered-properly/407858/2 "2026-07-17T06:28:04Z")

</div>

它完全符合由 [CommonMark 规范 § 4.6 — HTML 块](https://spec.commonmark.org/0.31.2/#html-blocks) 定义的、符合标准的行为。

关键规则是 **HTML 块类型 6** 。CommonMark 规范明确将 `div`（以及 `p`、`blockquote`、`table`、`h1–h6`、`ul`、`ol`、`li`、`hr` 等）列为块级标签。当解析器遇到以这些标签之一 **开头** 的行时，它会打开一个 HTML 块，其结束条件如下：

> **结束条件：该行后紧跟一个空行。**

你的其他示例是行内元素，其行为有所不同。

---

_[View the full topic](https://meta.discourse.org/t/text-after-div-tags-does-not-get-rendered-properly/407858)._
