-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Trailing space character in title should be removed #3483
Comments
@Jermolene - You're not thinknig of #3368 are you? I don't think this is the same issue, but maybe it is? This case with a simple space character seems much more critical. |
I think that that is the same problem: the dangers of invisible characters in tiddler titles. I also found #1791 "TW overwrites existing tiddler without a warning -> data loss" There are a lot of variants of this: there are Unicode characters that look the same but have different codes; in some situations one can't distinguish between two spaces or a single space. Anyhow, I can't quite duplicate the problem you're seeing here. When I create a tiddler with a trailing space in the title it is automatically trimmed. Are you perhaps creating the tiddler programmatically? |
One way is to tag a tiddler with "Foo " which will then not link to "Foo" ... I found #751 which is closed. If you say #751 covers this then please close this thread - even if I must say that I'm surprised by some of the conclusions there. The particular case with trailing space characters must surely be much more common that many of the other edge cases. Someone suggested coloring such extra spaces pink in edit mode, or perhaps a squiggly underline, which I think is a nice general idea; they're still there but you're alerted about it. |
I think #751 does cover the same problem. It sounds like the new thing here is the discussion about tag entry, and whether they should be trimmed too. |
(OP updated) |
Regardless of core functions handling leading and trailing spaces could we not provide a mechanism to simply remove them from a given string?. I have had mysterious spaces appearing in macros and at the time would have being happy to just have a method to remove them. |
As long as we're gathering issues related to trailing whitespace, I reported and fixed #2850 last year. |
As tags are tiddlers too, Im reporting here that someone on the groups reported a problem where they accidently tagged their tiddler with a space before the correct string. I think trailing and leading white spaces should be removed! |
hey @pmario, if I go to tw.com and remove |
I know, but that is a wontfix because of backwards compatibility. See my post above #3483 (comment) |
Hi @Jermolene Example
It is required to trim leading and trailing space before creating the tiddler Note: The example provided by @pmario over the Google Forum! |
I'm sorry but the new forum doesn't allow to edit posts. I did immediately post a corrected version in a new post, https://groups.google.com/g/tiddlywiki/c/O1oylX4H97k/m/8T87g6_gAgAJ |
Thank you @pmario |
No only trailing and leading spaces in title and tags but also in field name shall be trimmed! |
see this and linked comments #3483 (comment)
What does it mean: "You can not delete them?" ... Delete with TW or deleting them with the file explorer? |
Thanks @kookma @pmario I think that this might be a regression from #5113 and subsequent fixes. @joshuafontany it seems reasonable for the system to trim spaces from generated filenames, what do you think? |
@Jermolene @pmario @twMat @kookma |
@Jermolene I included these fixes alongside the fix for the OriginalFilesystemPath bugs. Best, |
Thanks @joshuafontany |
Serious issue: A suffixing space character in the title is apparently not removed when saving the tiddler. So "Foo " and "Foo" appear the same, both as titles in view mode and edit mode and also as tag pills.
Proposal: Automatic removal of trailing space characters in title when saving a tiddler and in tags when creating one.
Update based on discussion below: The proposal here concerns whether tags should be trimmed or not. The concern about tiddler titles turned out to be an edge case for #751 (albeit probably the most common one)
My position regarding tags is that they should follow the same rules as titles... and IMO they should both have trailing space characters trimmed or at least marked out, e.g in pink, in edit mode.
The text was updated successfully, but these errors were encountered: