Parse link references without knowledge of definitions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- markdown
- Lĩnh vực
- documentation
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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]:
- Ngôn ngữ chính
- Python
- Star
- 5.2k
- Fork
- 360
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của commonmark/commonmark-spec
-
NBSP written two different waysĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
commonmark/commonmark-spec#843 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
commonmark/commonmark-spec#838 · 2 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
commonmark/commonmark-spec#728 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
commonmark/commonmark-spec#847 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
commonmark/commonmark-spec#844 · 5 bình luận · 1 reaction ·
Tất cả issue của commonmark/commonmark-spec
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
WLAN-Pi/wlanpi-profiler#341 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Memory leak: the shared `validation_aborted_error` keeps every traceback it is raised throughCó thể đã có người làm @Fire162 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
graphql-python/graphql-core#287 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
roman-corgi/ctc-dip#160 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type-bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
render_findings.py reads and writes in the host's default encoding, so findings.html breaks on a cp1252 Windows hostCó thể đã có người làm @Aaqibhafeezkhan đã nhận hôm nay. Đang mởbug good first issue mentored python size: XS up-for-grabs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
dheerajjha/mcp-migrate#366 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày