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

Links inside bold/italic text result in invalid HTML

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
tooling

調査の方向性

まず、リポジトリの JavaScript パーサーで issue の Markdown 例を再現し、太字および斜体のラン内にネストされたリンクの処理箇所を特定します。生成された HTML を期待される出力と比較し、同じケースでリンク内の書式を変更せずに、タグが正しくネストされることを確認します。

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

説明

Links inside runs of bold or italic text are rendered as invalid HTML.

For example, the following Markdown:

foo **[link](https://example.com)** bar

is rendered as:

foo <strong><a href="https://example.com">link</strong></a><strong> bar</strong>

whilst the expected output would be:

foo <strong><a href="https://example.com">link</a></strong> bar

More examples here.

Two things are unexpected here:

  1. The output is invalid because the <strong> and <a> tags are closed in the same order in which they're opened.
  2. The <strong> tag is then re-opened and not closed until the end of the text, causing more of the text to be bold than intended.

The same happens when using __ instead of **, as well as with italics (_ or *).

When the formatting is inside the link, the result is as expected:

foo [**link**](https://example.com) bar

This renders as:

foo <a href=\"https://example.com\"><strong>link</strong></a> bar
主要言語
JavaScript
スター
2.4k
フォーク
115
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

developit/snarkdown のほかの issue

developit/snarkdown の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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