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

The image link has an extra \ added during the conversion process #64

Closed
4 tasks done
hyoban opened this issue Nov 11, 2024 · 2 comments
Closed
4 tasks done

The image link has an extra \ added during the conversion process #64

hyoban opened this issue Nov 11, 2024 · 2 comments
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@hyoban
Copy link

hyoban commented Nov 11, 2024

Initial checklist

Affected packages and versions

2.1.2

Link to runnable example

https://codesandbox.io/p/sandbox/remark-debug-formatted-autolink-simple-forked-mhn96l

Steps to reproduce

const sourceMarkdown =
  "![](https://image-proxy.zslren.com/img-proxy/?k=3507a87d&u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2Ftc9Zic7wWc9BZCDeUpBKjNhykdf3v3OKrGjF1mYlX8BEm3zCWWkhMH4S362huEz93Dz9qqIhJHmH4aLqiaOQa2jQ%2F0%3Fwx_fmt%3Djpeg)";

const mdast = remark().parse(sourceMarkdown);
const contents = toMarkdown(mdast);

Expected behavior

The image link should be

https://image-proxy.zslren.com/img-proxy/?k=3507a87d&u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2Ftc9Zic7wWc9BZCDeUpBKjNhykdf3v3OKrGjF1mYlX8BEm3zCWWkhMH4S362huEz93Dz9qqIhJHmH4aLqiaOQa2jQ%2F0%3Fwx_fmt%3Djpeg

Actual behavior

The image link is

https://image-proxy.zslren.com/img-proxy/?k=3507a87d\&u=https%3A%2F%2Fmmbiz.qpic.cn%2Fmmbiz_jpg%2Ftc9Zic7wWc9BZCDeUpBKjNhykdf3v3OKrGjF1mYlX8BEm3zCWWkhMH4S362huEz93Dz9qqIhJHmH4aLqiaOQa2jQ%2F0%3Fwx_fmt%3Djpeg

An extra \ appears before &u=, causing the image to not be displayed correctly.

Affected runtime and version

node@22.11.0

Affected package manager and version

No response

Affected OS and version

No response

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Nov 11, 2024
@wooorm
Copy link
Member

wooorm commented Nov 11, 2024

causing the image to not be displayed correctly.

If that happens, that is a bug in the tools you are using. You can raise problems with the tools you are using to preview/render markdown, with those tools themselves.

In markdown, that slash is allowed there.
In markdown, it’s good to have that slash there.

@wooorm wooorm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2024
@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label Nov 11, 2024

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants