You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, and zim-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.
The text was updated successfully, but these errors were encountered:
gsantner
changed the title
Wikitext/Zim: spaces not replaced with underscores in filename
v2.12.3 Wikitext/Zim: spaces not replaced with underscores in filename
Jul 23, 2024
gsantner
changed the title
v2.12.3 Wikitext/Zim: spaces not replaced with underscores in filename
v2.12.3 WikiText bug: spaces not replaced with underscores in filename
Jul 23, 2024
…kitext newfile #2362, virtual directory browser #2350) (PR #2370 by @hardhard1)
* Jump by a line identifier, not by id
* For all nodes, use eval
* Fixed bad key in snippet directory setting
* Fix virtual folders and wikitext underscores
…santner#2369, wikitext newfile gsantner#2362, virtual directory browser gsantner#2350) (PR gsantner#2370 by @hardhard1)
* Jump by a line identifier, not by id
* For all nodes, use eval
* Fixed bad key in snippet directory setting
* Fix virtual folders and wikitext underscores
(cherry picked from commit 57aaf0f)
IMPORTANT
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 namedThis is a new file.txt
instead ofThis_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:Steps to Reproduce
+
.txt
extension,Wikitext / Zim
type, andzim-wiki-empty.txt
templatePraise
Thank you so much! As a Zim enthusiast and heavy user, Markor has been a game-changer for my mobile note-taking.
The text was updated successfully, but these errors were encountered: