-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Add support for wikilinks format #407
Conversation
Run on Thu May 9 23:01:12 UTC 2024 |
5c8d06a
to
6828974
Compare
supporting either [[url|link text]] or [[link text|url]]
73b52ba
to
d7ee7eb
Compare
This works, but I hooked it before the normal bracket link processing cause it turned out to be much easier/cleaner, but I now realize it bypasses the normal inline processing of the link text. And I kinda think the link text should behave the same between the two. Which means emphasis, etc, would get properly handled in the link text, as it does for normal markdown links. But maybe that's not expected in wikilinks. It doesn't work that way in
yields
|
Hmm, I need to spin up a wiki on GitHub and see what their behavior is.
|
GH doesn't support markdown in the link text either. In fact GH doesn't recognize So I would say the approach right now is good enough. Still need to fix a failing spec. |
0304408
to
9b3896b
Compare
This is so it’s possible to tell the difference between a normal link and a wikilink during post-processing.
9b3896b
to
158f06a
Compare
@kivikakk I think this is ready to go. Mind taking a look at it when you have some time? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good! I love the extensive testing — I don't have much mind myself at the moment for thoroughly evaluating the correctness of the inline parsing bits, but I'm hoping that between tests, fuzzing, and any other reviews, it should be fine.
Co-authored-by: Asherah Connor <[email protected]>
Will be running |
|
d2002f3
to
24afea6
Compare
I think this is tightened up now. Even added a test to show how it works and doesn't work in pipe tables. Which is how it currently works in |
This looks great. I've made a small adjustment in b769ee4 such that the |
Good call, thanks! |
Add extensions to support both styles of wikilinks
[[display text|target page]]
[GitHub style][[target page|display text]]
[regular wiki link]most likely with
wikilinks_title_before_pipe
andwikilinks_title_after_pipe
extension names.Inspired by commonmark-hs