ueberdosis/tiptap

[Bug]: <col> Tags Are Not Self-Closed, Causing Backend HTML Parsers to Fail

オープン

#6,226 opened on 2025/04/01

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (1,979 件のフォーク)batch import
area: editorcomplexity: easygood first issueimpact: medium

Repository metrics

Stars
 (23,454 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Affected Packages

@tiptap/extension-table

Version(s)

2.11.5

Bug Description

We’ve encountered an issue where the generated <col> elements inside tables are rendered as:

<col style="min-width: 25px">

This is not valid HTML5. The <col> tag is a [void element](https://developer.mozilla.org/en-US/docs/Glossary/Void_element) and must be self-closing. It should be:

<col style="min-width: 25px" />

Problem

Our backend HTML parsers expect proper void tag declarations. The current form <col style="..."> is treated as invalid because it lacks a closing slash and is not self-closing, resulting in HTML parsing issues or broken rendering.

Example of Invalid Output

<colgroup>
  <col style="min-width: 25px">
  <col style="min-width: 25px">
  <col style="min-width: 25px">
</colgroup>

Expected Output

<colgroup>
  <col style="min-width: 25px" />
  <col style="min-width: 25px" />
  <col style="min-width: 25px" />
</colgroup>

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

Expected Output

<colgroup>
  <col style="min-width: 25px" />
  <col style="min-width: 25px" />
  <col style="min-width: 25px" />
</colgroup>

Additional Context (Optional)

We are using https://github.com/yikoyu/vuetify-pro-tiptap/tree/master

Dependency Updates

  • Yes, I've updated all my dependencies.

コントリビューターガイド