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

If you insert a link with "?" at the end of the link in the text, the text will be replaced by a link #471

Open
nikita-jpg opened this issue Nov 13, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nikita-jpg
Copy link

Steps to Reproduce

  1. Create a link with "?" "http://example.com/?"
  2. Highlight the text ("test text")
  3. Paste URL using Ctrl + V.

Expected Behavior

The display text should be updated to the new URL .

Actual Behavior

It was: "test text". Become: "http://example.com?"

@nikita-jpg nikita-jpg added the enhancement New feature or request label Nov 13, 2024
@makhnatkin
Copy link
Collaborator

We use linkify for parsing from the buffer, it in turn works like this, you can check it in the demo. I assume that from the point of view of markdown behavior, this can be considered valid, because there may be a question mark at the end of the line and it refers to the line, not to the link.

On the other hand, when inserting from the buffer, we may need to solve this differently, for example use some regexp

@nikita-jpg maybe you have some ideas?

@makhnatkin makhnatkin added the good first issue Good for newcomers label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants