Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Leading and trailing spaces vanish in multi-line "link text"

オープン
#119 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
javascript
領域
tooling

調査の方向性

リポジトリのファイル、テスト、エントリーポイントは指定されていません。まず issue にあるリンクテキストの例を 2 つとも再現し、それらの AST 出力を調べてから、複数行リンクのパース動作を追跡し、1 行リンクの場合と比較してください。先頭と末尾のスペースの扱いに一貫性があり、リグレッションテストでカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

In this example, the spaces are preserved:

[ a ](b)

In that example, however, the spaces are swallowed:

[ 
 a 
 ](b)

Even stranger, the first space after the opening bracket creates an empty <text></text> element in the AST, while the last space before the closing bracket creates nothing.

http://spec.commonmark.org/dingus/?text=%5B%20a%20%5D(b)%0A%0A%5B%20%0A%20a%20%0A%20%5D(b)

Most (all?) CommonMark parsers show the same awkward behavior:

http://johnmacfarlane.net/babelmark2/?text=%5B+a+%5D(b)%0A%0A%5B%0A+a+%0A%5D(b)

主要言語
JavaScript
スター
1.6k
フォーク
234
平均マージ
1日 27分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

commonmark/commonmark.js のほかの issue

commonmark/commonmark.js の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。