-
Notifications
You must be signed in to change notification settings - Fork 408
Closed
Description
IMPORTANT
- Package: net.gsantner.markor
- Version: v2.12.3 (152) (Sorry, I couldn't test the latest commits on the master branch).
- Flavor: Gplay (release)
- Build date: 2024-07-20T14:14Z
- ISource: Google Play
- VCS Hash: 275f488
- VCS Msg: Markor v2.12.3 (152)
- I accept that this issue will be closed without further notice in case I didn't describe the problem including general information, or didn't search for similar issues & requests.
Explain the Problem
When creating a new Wikitext/Zim file with a title that contains whitespaces, the spaces are not replaced by underscores in the filename. But Zim does not support spaces in filenames.
For example, creating a new file with a title This is a new file
makes a file named This is a new file.txt
instead of This_is_a_new_file.txt
.
This used to work on v2.12.0, but stopped after the updates to the NewFileDialog
a few months ago (f35383a). I believe the relevant code was this one:
private String getFileNameWithoutExtension(String typedFilename, int selectedTemplatePos) {
if (selectedTemplatePos == 7) {
// Wikitext files always use underscores instead of spaces
return typedFilename.trim().replace(' ', '_');
}
return typedFilename.trim();
}
Steps to Reproduce
- Click on the big red button with a
+
- Write a title with spaces "This is a title"
- Select
.txt
extension,Wikitext / Zim
type, andzim-wiki-empty.txt
template - Click OK
Praise
Thank you so much! As a Zim enthusiast and heavy user, Markor has been a game-changer for my mobile note-taking.