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

Add url escaping with jq, support nested notes. #1

Closed
wants to merge 1 commit into from

Conversation

sidequestboy
Copy link

Adds dependency of jq for escaping of spaces and special characters in markdown filenames.

Adds support for nested files.

Adds dependency of jq for escaping of spaces and special characters
in markdown filenames.

Adds support for nested files.
@sidequestboy
Copy link
Author

sidequestboy commented Sep 21, 2023

Maybe nested files were working before actually, but spaces in filenames was definitely broken!

I am unsure you want to add jq as a dependency, but it seems like a small dependency anyway.

(Alternatively, maybe you could just at least call string.gsub to %-encode the spaces)

Also, I investigated curl's ability to url-encode, but that seemed limited to query data (see here)

@oflisback
Copy link
Owner

Thanks a lot for your investigation and PR! This must be fixed and I agree about checking what alternatives there are before adding another dependency. Looking forward to try this out later today.

oflisback added a commit that referenced this pull request Sep 21, 2023
This fixes problem described in
#1
related to opening notes with whitespace or special
characters in their name.
@oflisback
Copy link
Owner

I pushed an alternative solution to the uri encoding problem: 6368d1b

Do you also think this is a good enough approach?

@sidequestboy
Copy link
Author

That looks great! I tested and it works for my case, it's nice to not add an external dependency for something so small too

oflisback added a commit that referenced this pull request Sep 21, 2023
This fixes problem described in
#1
related to opening notes with whitespace or special
characters in their name.
@oflisback oflisback closed this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants