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

Address autolink edge cases. #426

Merged
merged 16 commits into from
Jul 10, 2024
Merged

Address autolink edge cases. #426

merged 16 commits into from
Jul 10, 2024

Conversation

kivikakk
Copy link
Owner

@kivikakk kivikakk commented Jul 10, 2024

Start of a spike to try addressing autolink edge cases by bringing in the pre-postprocessing (ahem) step from cmark-gfm, and then aligning the postprocessing ones.

Fixes #382, fixes #388, fixes #423, fixes #58 (!).

TODO:

  • fix we://w all_options case.
  • keep fuzzing.

Copy link
Contributor

Command Mean [ms] Min [ms] Max [ms] Relative
./bench.sh ./comrak-4587e20 322.2 ± 3.0 318.9 328.1 2.93 ± 0.06
./bench.sh ./comrak-main 317.6 ± 1.6 315.5 323.2 2.89 ± 0.06
./bench.sh ./pulldown-cmark 110.0 ± 2.1 107.9 118.9 1.00
./bench.sh ./cmark-gfm 118.0 ± 0.8 116.7 119.6 1.07 ± 0.02
./bench.sh ./markdown-it 478.2 ± 2.2 474.6 482.5 4.35 ± 0.09

Run on Wed Jul 10 09:16:52 UTC 2024

@kivikakk kivikakk marked this pull request as ready for review July 10, 2024 11:21
@kivikakk
Copy link
Owner Author

Fuzzed gfm for several hours with no finds; all_options found a few quickly as relaxed_autolinks adds some flavour, but having fixed those reasonably robustly there seems to be nothing left there either. Will keep it running for the next while but I'm happy to merge this now and close a 6½ year old issue (!).

@kivikakk kivikakk merged commit 3ab64a6 into main Jul 10, 2024
39 checks passed
@kivikakk kivikakk deleted the autolink-edge branch July 10, 2024 14:00
@digitalmoksha
Copy link
Collaborator

Wow, nice job @kivikakk! 🚀

@kivikakk
Copy link
Owner Author

Thanks so much! I was feeling motivated today 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants