lycheeverse / lychee

⚡ Fast, async, stream-based link checker written in Rust. Finds broken URLs and mail addresses inside Markdown, HTML, reStructuredText, websites and more!
https://lychee.cli.rs
Apache License 2.0
2.05k stars 121 forks source link

Lychee trys to parse math equation leading to erroneous error message. #1197

Closed etpalmer63 closed 2 months ago

etpalmer63 commented 1 year ago

For example:

$$
[\psi](\mathbf{L}) 
$$

Is interpreted as a link and checked, giving an erroneous error message.

Is there anyway to workaround this? -- Thank you!

mre commented 1 year ago

I'm assuming that's inside a Markdown file?

Is there anyway to workaround this? -- Thank you!

Well, you can exclude it with --exclude mathbf until we fixed the bug.

etpalmer63 commented 1 year ago

Ah thank you @mre ! I didn't realize the exclude would be that easy so I hadn't even looked yet. Thanks!

Also, yes. This is inside a Markdown file.

HU90m commented 8 months ago

The solution to this bug is to support the maths syntax. We wouldn't really want to work out a spec and add custom parsers atop pulldown-cmark, so we are blocked on this being supported upstream.

It looks like there is some interest: https://github.com/raphlinus/pulldown-cmark/pull/622 https://github.com/rust-lang/mdBook/issues/2222

As this bug has a workaround, I think it would be ok to close this issue with the stance that we will support maths syntax when pulldown-cmark does. Of course, discussion can still take place on the closed issue and it can be re-opened by anyone who wishes.

@mre I will leave closing this to you if you agree.

mre commented 8 months ago

Good call. Seems like upstream process on this feature is slow, so might not make much sense to hold our breath before it lands. Closing. In case this gets merged in the future, I'd be thankful if someone could reopen the issue.

HU90m commented 6 months ago

https://github.com/pulldown-cmark/pulldown-cmark/pull/734#issuecomment-2016557338 :eyes:

@mre this could be re-opened

mre commented 6 months ago

Thanks for the notification.

mre commented 2 months ago

👋 It got fixed by Hugo.

etpalmer63 commented 2 months ago

Thank you both for getting this done! 🙏