Milkdown / milkdown

🍼 Plugin driven WYSIWYG markdown editor framework.
https://milkdown.dev
MIT License
8.96k stars 405 forks source link

[Bug] Email link's `href` is wrong #1144

Open ayumitamai97 opened 1 year ago

ayumitamai97 commented 1 year ago

Initial checklist

Affected packages and versions

@milkdown/preset-gfm

Link to runnable example

Milkdown Playground https://milkdown.dev/playground

Steps to reproduce

Example:

test@example.com

Expected behavior

The link text and the linked email address should be the same

Example:

[test@example.com](test@example.com)

Actual behavior

The linked email address is cut off at the first character

Example:

[test@example.com](test@example.c)

The text is wrapped with <> at first, and after I put one character after the dot ., it's converted to this syntax [](). Once it's converted to [](), the linked email address inside () is no longer updated.

https://github.com/Milkdown/milkdown/assets/29456740/5f9a1fb7-513d-4dfc-bb34-35160e2b1ab1

Runtime

Chrome

OS

macOS

Build and bundle tools

Vite

quank123wip commented 4 months ago

I'd like to fix this, but currently seems like we have temporarily removed this feature. I haven't checked the old version, but looks like it automatically transforms the link into a markdown link. And seems like gfm doesn't work like this, instead it turns a link into a href when it renders. I think we should make it like github, render it in rendering process.