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

fix: avoid panic in normalize link plugin #24

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

sanyuan0704
Copy link
Collaborator

When the user uses relative path in link syntax, such as:

[cat](../../../assets/cat.png)

If the pointed path is out of root dir, we can print some warning to user instead of panic.

Copy link

Benchmark Results

Linux

group                main                                   pr
-----                ----                                   --
mdx_rs/example.md    1.02      2.0±0.02ms     2.8 MB/sec    1.00  1979.4±22.51µs     2.8 MB/sec

Windows

group                main                                   pr
-----                ----                                   --
mdx_rs/example.md    1.00      2.0±0.05ms     2.9 MB/sec    1.04      2.1±0.27ms     2.8 MB/sec

@sanyuan0704 sanyuan0704 merged commit aeafa6f into main Mar 16, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant