dy-sh / obsidian-consistent-attachments-and-links

Obsidian plugin. Move note with attachments.
MIT License
228 stars 24 forks source link

ADD: add command replace-all-markdown-links-with-wikilinks #68

Closed jiyee closed 11 months ago

jiyee commented 11 months ago

Fix: #47 #43 #18

jiyee commented 11 months ago

Current, the result of collect all attachments and moving file is different, Like: F1/file.md contains assets/IMG.png, using wiki link like ![[IMG.png]], with the option of attachment folder is set "./assets" when moving the F1/file.md to F2/file.md, the attachment will relocated to F2/IMG.png, not F2/assets/IMG.png. perform collecting all attachments, the attachment will relocated to F2/assets/IMG.png.

The result depends on whether the option contains ${filename}, I think two behavior should yield same result.

mnaoumov commented 11 months ago

@jiyee thanks for your PR, but I don't think we are going to merge it because it goes against the philosophy of this plugin

If look at README it says

"Use [[Wikilinks]]": disabled. Wikilinks are not a markdown standard.

If you look closely to https://github.com/dy-sh/obsidian-consistent-attachments-and-links/blob/master/src/main.ts#L441 and https://github.com/dy-sh/obsidian-consistent-attachments-and-links/blob/master/src/main.ts#L455, you will find that Check Vault consistency command considers wiki links and wiki embeds as the issues to be fixed, unlike your PR.

Moreover, the functionality you suggested to add, is already covered by another plugin https://github.com/ozntel/obsidian-link-converter and some other similar ones.

jiyee commented 11 months ago

@jiyee thanks for your PR, but I don't think we are going to merge it because it goes against the philosophy of this plugin

If look at README it says

"Use [[Wikilinks]]": disabled. Wikilinks are not a markdown standard.

If you look closely to https://github.com/dy-sh/obsidian-consistent-attachments-and-links/blob/master/src/main.ts#L441 and https://github.com/dy-sh/obsidian-consistent-attachments-and-links/blob/master/src/main.ts#L455, you will find that Check Vault consistency command considers wiki links and wiki embeds as the issues to be fixed, unlike your PR.

Moreover, the functionality you suggested to add, is already covered by another plugin https://github.com/ozntel/obsidian-link-converter and some other similar ones.

OK, I got it.

But, take a look at the bugfix commit to see if it is a bug or not? https://github.com/dy-sh/obsidian-consistent-attachments-and-links/pull/68/commits/e324a48fb4330204b2587dd5274f184354f44c6e as I mentioned before.

mnaoumov commented 11 months ago

@jiyee, yes, this seems to be a bug. Please create a proper bug report issue describing the use case and the PR to address the issue. Please also don't mix commits with actual fixes and fixing typos