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

Fix tempfile suffix logic #122

Merged
merged 1 commit into from
Sep 13, 2022
Merged

Fix tempfile suffix logic #122

merged 1 commit into from
Sep 13, 2022

Conversation

samuelallan72
Copy link

Previously the file extension (suffix) only depended on
the value of cfg_default_markdown,
which wasn't helpful for editing existing notes.

Ensure that for existing notes,
the file extension for tempfiles passed to the editor
matches that of the note type (plain text or markdown).
Retain the old behaviour for new notes.

Previously the file extension (suffix) only depended on
the value of `cfg_default_markdown`,
which wasn't helpful for editing existing notes.

Ensure that for existing notes,
the file extension for tempfiles passed to the editor
matches that of the note type (plain text or markdown).
Retain the old behaviour for new notes.
@pataquets
Copy link
Contributor

pataquets commented Sep 13, 2022

Tested OK.
Before PR: temp filename (as reported by $EDITOR) has txt extension for MD notes.
After PR: temp filename (as reported by $EDITOR) has mkd extension for MD notes.
Also tested for non-MD notes. No change on behaviour.
Partly solves #120.
LGTM.

@samuelallan72 samuelallan72 merged commit ed80734 into insanum:master Sep 13, 2022
@samuelallan72 samuelallan72 deleted the tempfile-ext-logic branch September 13, 2022 02:23
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