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

Check for .md file existence on link click. #1086

Merged
merged 2 commits into from Dec 14, 2019

Conversation

CDOApps
Copy link
Contributor

@CDOApps CDOApps commented Aug 20, 2019

Closes #1085

@FranklinYu
Copy link
Member

@FranklinYu FranklinYu commented Aug 20, 2019

I like the idea, but in this case we can be more aggressive. For bare path without file extension like [this][file-name], I think we can simply create file-name.md. This is not necessarily .md; if I recall correctly user can specify a preferred extension.

@CDOApps
Copy link
Contributor Author

@CDOApps CDOApps commented Aug 20, 2019

I like the idea, but in this case we can be more aggressive. For bare path without file extension like [this][file-name], I think we can simply create file-name.md.

Tell me if I'm wrong, isn't what MacDown's doing if the file doesn't exist?

This is not necessarily .md; if I recall correctly user can specify a preferred extension.

I didn't see where to define a preferred extension but it sounds better than using hard coded .md for extension. Actually, I based my solution on the prepareSavePanel: which fills the path with .md if the file name is not using this for extension.

@FranklinYu
Copy link
Member

@FranklinYu FranklinYu commented Aug 20, 2019

@CDOApps Oh then maybe MacDown is already doing that. In that case we can merge this as-is. Let me check this week when I get back to my Mac… Currently using Windows.

@uranusjr
Copy link
Member

@uranusjr uranusjr commented Dec 13, 2019

Maybe we can check for more stuffs (e.g. check for UTI instead of extension, but this good enough as-is.

@FranklinYu FranklinYu merged commit 080bd34 into MacDownApp:master Dec 14, 2019
1 check passed
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.

3 participants