Multiple headings on a single line without newline are broken between MD and RT modes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- html, markdown, typescript
調査の方向性
h1 と h2 のインライン HTML でラウンドトリップを再現し、その後 markdown-serializer.ts、特に defaultMarkdownSerializerNodes.heading と customMarkdownSerializerNodes.html_block を調べます。Markdown と Rich Text を切り替えたときに、両方の見出しが 1 つの無効なタグに結合されず保持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When multiple heading HTML tags are inlined without a newline at the end of the line, switching between Markdown and Rich Text mode will mangle the resulting headings into a single invalid tag, breaking the output.
To Reproduce
Steps to reproduce the behavior:
In Markdown mode, paste the following HTML into the editor. Ensure there are no newlines.
<h1>Heading1</h1><h2>Heading2</h2>
Switch to Rich Text mode and back to Markdown mode
You'll now see <h1Heading1h1h2>Heading2</h1Heading1h1h2>
Expected behavior
I expect the round-trip to preserve the headings as they were at the start.
Hunches:
When a heading in pure HTML is serialized, if it doesn't have a newline at the end, it goes through the heading: method of defaultMarkdownSerializerNodes in markdown-serializer.ts. If it has a newline at the end, it'll instead go through html_block() of customMarkdownSerializerNodes in the same file.
Screenshots

Desktop (please
complete the following information):
- OS: Windows 10
- Browser Chrome
- Version 103
- 主要言語
- TypeScript
- スター
- 440
- フォーク
- 61
- 平均マージ
- 4日 3時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
StackExchange/Stacks-Editor のほかの issue
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
StackExchange/Stacks-Editor#504 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
StackExchange/Stacks-Editor#395 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
StackExchange/Stacks-Editor#343 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Task list supportオープンenhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
StackExchange/Stacks-Editor#272 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
StackExchange/Stacks-Editor#250 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
StackExchange/Stacks-Editor の issue をすべて見る
似ている issue
-
chore v2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/servers#5115 ·
メンテナーはふだん 1 日以内に返信
-
beginner bug good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
philaconvalley/website#168 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
oss-slu/lrda_mobile#294 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hatchet-dev/hatchet#5179 ·
メンテナーはふだん 1 日以内に返信