read: a bold or italic span starting or ending with punctuation reads back as literal asterisks
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
調査の方向性
Start with the table property test mentioned in the issue and trace the read/write and publish conversion paths for marked spans. Reproduce the punctuation cases against the current goldmark-based behavior, then compare the relevant handling with CommonMark's flanking rules. Done means spans such as (b) next to letters no longer round-trip or publish with literal asterisks.
索引モデルが issue の本文から書いたものです。
説明
A bold, italic or strikethrough span whose text starts or ends with punctuation, with a letter or digit just outside it, reads back as literal asterisks. Reproduced on main:
| storage | read writes | publish sends |
|---|---|---|
<p>a<strong>(b)</strong>c</p> |
a**(b)**c |
<p>a**(b)**c</p> |
<p><strong>&copy;</strong>a</p> |
**\©**a (since #203) |
literal asterisks |
CommonMark's flanking rule has two halves. The whitespace half (a delimiter next to whitespace on the wrong side does not open or close) was fixed for marks in #204. The punctuation half remains: a closing ** preceded by punctuation closes only if it is followed by whitespace or punctuation, and an opening ** followed by punctuation opens only if it is preceded by whitespace or punctuation. So **(b)**c does not close, and the whole span publishes as text with its asterisks.
Escaping cannot fix it, since the punctuation is the span's own text. Possible fixes:
- Write such a span as inline HTML (
<strong>(b)</strong>), which goldmark passes through and the forward converter already accepts. - Use the
_delimiter where it helps. It has stricter intraword rules, so it is probably not a general answer.
Found while working on #203; the table property test's generator now keeps a mark's text from starting or ending with punctuation to avoid it.
- 主要言語
- Go
- スター
- 4
- フォーク
- 1
- 平均マージ
- 2時間 31分
- マージ済み PR(30日)
- 49
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mozilla/markfluence のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
mozilla/markfluence#214 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
mozilla/markfluence#213 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
mozilla/markfluence#210 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
mozilla/markfluence#209 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
mozilla/markfluence#205 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
mozilla/markfluence の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
duplication
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openvibely/openvibely#1443 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
keyxmakerx/Chronicle#1179 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
michelangelo-ai/michelangelo#2258 ·
メンテナーはふだん 1 日以内に返信