JichouP / obsidian-marp-plugin

Plugin to use Marp with Obsidian
MIT License
123 stars 10 forks source link

Update: Obsidian API fix and Wikilink Zoom #272

Closed Chivier closed 6 months ago

Chivier commented 7 months ago

Recently, I update my obsidian and I found some APIs were updated. So I updated a new version for wikilink replacement function. BTW, I also make a simple support for image zoom in wikilink.

Chivier commented 7 months ago

Hey @JichouP! I was thinking, could you help merge this when you have some free time? Also, maybe we could stay in touch via email to keep this extension alive and well. I'd be thrilled to connect with Japanese developers on Github!

JichouP commented 7 months ago

@Chivier Thank you for your contribution. And I am very sorry for the late response.

Please allow me to confirm one thing.

Recently, I updated my obsidian and I found some APIs were updated. So I updated a new version for wikilink replacement function.

Could you please explain which APIs were updated and how the code needs to be changed? From the changes I see, it appears that only the Wikilink Zoom functionality was added.

Chivier commented 7 months ago

Ahh, Obsidian now cannot fetch correct file path with app.vault.adapter API. I also do not find corresponding update from their API docs. Anyway, it's very strange, you can see in the picture:

image

The correct path is ...../Work/Notes/Appendix/Pated Image ..... In several version ago, all of them works fine. But now they all lost 'Appendix' level in the path. I cannot figure out the reason. I prefer to visit files and scan them directly. While the performance may not be entirely satisfactory, it is now capable of rendering images by wikilinks now.

JichouP commented 7 months ago

Okay, I understand the situation.

How about simply referring to an image like ![[Appendix/Pasted Image ...]], not ![[Pasted Image ...]]?

Chivier commented 7 months ago

Great idea! I'll work on updating another version later today.