Parse link references without knowledge of definitions
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- markdown
調査の方向性
Start with CommonMark specification Example 568 and the issue's discussion of reference definitions, streamed parsing, and syntax highlighting. Determine whether the proposed parsing behavior is an accepted specification change; done would require a maintainer decision and, if accepted, corresponding specification and reference-test updates.
索引モデルが issue の本文から書いたものです。
説明
Heya, I would like to understand the rationale behind https://spec.commonmark.org/0.30/#example-568
[foo][bar][baz]
[baz]: /url
<p>[foo]<a href="/url">bar</a></p>
This enforces on both users and parsers that [foo][bar][baz] cannot be "understood" in isolation, but only after all definitions within the document have been identified.
Particularly for parsers (such as markdown-it and remark), this necessitates a bunch of extra complexity to run a "pre-parse", before one can actually parse the document in full.
In turn, it precludes any kind of streamed or incremental parsing, or to write a good regex based syntax highlighter (such as TextMate grammars)
I feel the output of this example should be:
<p>[foo][bar]<a href="/url">baz</a></p>
or even just
<p><a href="/url">baz</a></p>
i.e.
- There would be a full parse, during which both
[foo][bar]and[baz]are captured as link references in the AST. - During this parse all definitions are also captured
- On conversion to HTML, when encountering the
[foo][bar]link reference, with no matched definition, it would be output in its raw (encoded) format, or even just omitted.
Is there any rationale to Example 568 that I am missing?
In fact, the syntax highlighting, here on GitHub, demonstrates exactly the problem, in that it cannot "work out" what is a link reference, and incorrectly highlights [foo]:
- 主要言語
- Python
- スター
- 5.2k
- フォーク
- 360
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
commonmark/commonmark-spec のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
commonmark/commonmark-spec#843 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
commonmark/commonmark-spec#838 · コメント 2 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
commonmark/commonmark-spec#728 · コメント 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
commonmark/commonmark-spec#844 · コメント 5 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
commonmark/commonmark-spec#842 ·
commonmark/commonmark-spec の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws-samples/sample-per-model-bedrock#464 ·
メンテナーはふだん 1 日以内に返信
-
lesson-submission pending-review
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
Ikalus1988/MisakaNet#3789 ·
メンテナーはふだん 1 日以内に返信
-
Python Volcengine provider returns failures instead of raising them対応中かも @Ricardo-M-L が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
agent-infra/sandbox#248 ·
-
[Bug] cloud JSON directory loading assumes a Key field in fsspec listings対応中かも @Ricardo-M-L が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
hiyouga/LlamaFactory#10910 ·
メンテナーはふだん 1 日以内に返信
-
Bundled uv is never updated and trusts the compromised eMudhra certificates対応中かも @FabienDanieau が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100