Сut breaks when clicking on the link in the header

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
markdown, react, typescript
領域
frontend

調査の方向性

Start with YFmStaticView and the transform configuration used to render Markdown. Reproduce the behavior in the linked Storybook preview by adding markdown-it-link-attributes with the target and rel attributes, then trace how clicking a link inside the cut header affects the cut's open/close state. Done means the cut continues to open and close after its header link is clicked.

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

説明

Hi!

I am using YFmStaticView to display formatted html from markdown (your example in storybook).

When using markdown below, the "cut" breaks after clicking on the link. The problem is that when you click on the "Cut" header, it stops opening and closing content (I attached a screenshot when the "cut" is open, but there is no content).

{% cut "Link [https://ya.ru](https://ya.ru) link" %}

body

{% endcut %}
Image

The problem occurs when the following options are added for transform:

import linkAttributes from 'markdown-it-link-attributes';

...

builder.configureMd(md => md.use(linkAttributes, {
        attrs: {
            target: '_blank',
            rel: 'noopener noreferrer',
        },
    })
主要言語
TypeScript
スター
428
フォーク
48
平均マージ
5日 15時間
マージ済み PR(30日)
47

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

gravity-ui/markdown-editor のほかの issue

gravity-ui/markdown-editor の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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