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

Default Template doesn't work with nested folders #8

Closed
JeppeKlitgaard opened this issue Jun 1, 2021 · 5 comments
Closed

Default Template doesn't work with nested folders #8

JeppeKlitgaard opened this issue Jun 1, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@JeppeKlitgaard
Copy link

JeppeKlitgaard commented Jun 1, 2021

Hi @Vinzent03!

CC @Moonbase59

Thank you so much for adding support for default templates for specific folders!

I have noticed that it currently doesn't work with nested folders though, which is something I would find super useful.

Expected Behaviour

Default templates work for nested folder structures.

  • 'Deepest match' has priority (if both /a/ and /a/b/ have templates specified, use template for /a/b/

Actual Behaviour

Does not work for nested folders.

My setup is:

image

But the template is only activated for files that are in / directly, not in, for example /Physics/.

This is not just for defining templates in / though. I have a template set for /Physics/ as well in order to try to alleviate this, but /Phyiscs/Quantum/newfile.md will not make use of the /Physics/ template.

@Vinzent03
Copy link
Owner

I can confirm that applying a template for the root folder does not work for subfolders, but templates for any other folder works in my testing with subfolders.

@Vinzent03 Vinzent03 added the bug Something isn't working label Jun 1, 2021
@JeppeKlitgaard
Copy link
Author

🤦‍♂️ You're right. I was in my Math folder.

I could've sworn I couldn't get this to work the other day...

Nonetheless, support for a default specified on / would be super neat for those of us who have a lot of subfolders there as well!

@Vinzent03
Copy link
Owner

Yeah I understand. It's because the root folder path is /, but the path of every subfolder is just folder/subfolder so without the /. Will fix this.

@JeppeKlitgaard
Copy link
Author

I see.

Perfect, thank you so much. And thank you for making such a nice plugin - it is a real life-saver!

@Vinzent03
Copy link
Owner

Should be fixed now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants