-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Obsidian wikilink images ![[image.jpg]] #535
Comments
It might be! PRs welcome; @digitalmoksha has spearheaded the wikilink feature and may be able to guide more. |
Thank you so much! I'd be delighted to test such a feature if helpful 😁 |
@0atman 🤔 as far as I can tell, |
(Apologies, I meant |
By 'wikilink', I don't mean Mediawiki, I mean the short form of links that github supports in github wiki. To be clear, this is not standard markdown, but a widely-used extension. Many personal wiki tools (the biggest of which is Obsidian, I believe) support this image format, and Pandoc added support in 2023 (jgm/pandoc#8853 (comment)) I wonder if it could be an option in comrak? |
@0atman I dug into this a little more. Based on https://docs.github.com/en/communities/documenting-your-project-with-wikis/editing-wiki-content#adding-images and my own testing, GitHub uses the standard wikilink syntax, In Obsidian, the You're right,
It does support generic links out to the internet. It doesn't, as far as I can tell, do anything with sizing, etc, which seems to be possible in Obsidian. I think if we were to add an option to support this, it would make sense for it to mirror the embed ability of |
Ah, of course, it IS used for embedding other files too (I hardly ever do so, I forgot). Looks like pandoc has specialist rules per file type (such as ogg in your example), perhaps the first file type comrak supports could be an image tag, given I suspect that's the most common embedded file? |
I'm a little weary of having Comrak itself know how to translate certain kinds of embeds — I imagine there'll be many different requirements even for the same kind of filetype (do we embed a Instead I'd rather us support parsing these embeds, but require a callback to do so, which gets given the content and can do with it as it wishes. :) Then someone could develop an Obsidian-compatible callback if they like, and publish that, and someone else could do a pandoc-compatible one if they want, whatever. |
Are you suggesting parsing them and adding a node to the AST (like we do with images) and then use the new HTML custom formatter to handle the rendering? Maybe an option listing the extension for each type so it can be configured what is detected? |
I wasn't especially suggesting that; more, a render option which is an |
So using the current adapter paradigm. |
Sure. See also |
ah yeah, I've never really looked into those |
Hi @kivikakk, thanks so much for your work here.
Image nodes are emitted for the normal
![]()
image tags, but not for![[]]
wikilink image tags.✅ Markdown links
❌ wikilinks
I wonder if it might be a simple change to support this? Thank you!
The text was updated successfully, but these errors were encountered: