Сut breaks when clicking on the link in the header

Aperta
#575 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
markdown, react, typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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',
        },
    })
Lingua principale
TypeScript
Stelle
428
Fork
48
Merge medio
5g 15h
PR unite (30g)
47

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di gravity-ui/markdown-editor

Tutte le issue di gravity-ui/markdown-editor

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.