Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I type "[", a "\" appears before "[" in the markdown source code #1278

Open
2 tasks done
bent2685 opened this issue Mar 23, 2024 · 6 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@bent2685
Copy link

bent2685 commented Mar 23, 2024

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Affected packages and versions

7.3.3

Link to runnable example

No response

Steps to reproduce

当我输入[的时候,[的前面会出现一个多余的\

导致无法使用 Link和 Img,因为Link和Img是[开头。在官方的Playgroud中也出现了这个现象

eg:
当我输入

[百度](http://www.baidu.com/)

在md源码中会被解析成

\[百度]\(http\://www\.baidu.com/)

最终导致Link无法显示

Expected behavior

[百度](http://www.baidu.com/)

Actual behavior

\[百度]\(http\://www\.baidu.com/)

Runtime

Electron

OS

macOS

Build and bundle tools

Vite

@bent2685 bent2685 added the bug Something isn't working label Mar 23, 2024
@bent2685
Copy link
Author

image

@bsdayo
Copy link

bsdayo commented Apr 4, 2024

Meeting the same problem, cannot type any links.

image

@chainlist
Copy link

Same here.

@Saul-Mirone do you have a plan/idea how to fix this?

@ravi-ojha
Copy link

ravi-ojha commented May 6, 2024

image

Same issue (but trailing slash) with using Shift+Enter and then typing anything.

Edit: Found syntax-tree/mdast-util-to-markdown#45
It looks intentional for this trailing slash. Although, this is not standard markdown syntax.

@DanielPower
Copy link

I'm seeing this as well. If I include a [ in the initial value, it is parsed correctly and links work. But if a [ is typed into the editor, it is escaped with . This means links are impossible to create in the editor, including in the Playground.

@DanielPower
Copy link

I've tested that this issue was introduced in 7.3.3 and still exists in 7.3.6. Reverting to 7.3.2 resolves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants