-
Notifications
You must be signed in to change notification settings - Fork 37
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
data loss using line-spanning font tags on a bulleted list #21
Comments
Thats definitly bad xml, tags must not overlap. In fact the loadnote unit can probably cope with it, I made that very tolerent of such things but the tools that populate (eg) the SearchForm or are used in the syncing process use library xml readers. And they will not tolerate such things. Now, interesting question, whats the date on that file ? If its pretty old, its possible you used an early release of tomboy-ng before I had that bullet worked out well. I sure had a lot of problems with it, due, mainly to the fact that KMemo notes a block of text bullet at the end of the para, not the start ?? Due to nature of this problem, messing up a note, I'd really like you to try and repeat it please. |
Interesting, so you made it clever enough to not save invalid xml (what happened in #2), downside is, changes are silently lost. The XML gets definitively messed up by font functions with marks spanning over |
Yes, my theory was that I had to be sure that any note that could get past the SearchForm layer had to be opened safely by LoadNote. The technology I used in loadnote is slower than the well tuned xml parsers that assume the xml will be ok and if not, just raise an exception. |
All changes should be saved, no matter of the validity test. I fear it's not only the early but current code that creates invalid XML by spanning Please try it:
From a user's perspective damaged notes should be hidden from standard search, but clicking a checkbox could make them visible to give users a chance to copy content to a new note. (if there are no damaged notes, this checkbox should not appear of course). |
OK, if thats the case, its a real problem because the bullet code is not pretty and took a lot of work ! |
OK, yep, it was a bad as I feared. I think that unit needs to be rewritten using library XML tools. |
For the record, I believe this issue was fixed with 6525c13 but instead of saying #21 I said #12. |
There are still several issues with bullets.
|
I think you are confusing at least two issues here. I personally hate the way bullets are implemented right now but thats an issue that derives from KControls. In Kmemo, the bullet-ness of a bit of text is recorded in the paragraph marker associated with the end of the text, not the start. So, sneak up behind some bullet point and press backspace, it cancels the bullet. I already intercept backspace to some extent to remove the worst of the wierdness but doing that a lot more is necessary. Its on the todo list. One thing that worries me, as an english speaker, there are no higher uncode characters in my test documents. I assume you do have such things in your notes ? David |
i just tried again to highlight bulleted text, quit and found the change missing after a restart. can't you reproduce it? |
If it saves, the highlight is certainly saved on my system. And it does it using good xml. However, changing the highlight (and bold, italics etc) does not mark the note as dirty and therefore, unless you make some other change, the note is not saved again. Thats been the case from day one. You should be able to see that by watching the 'd' and 'c' top right of the note window. It becomes 'd' when the note is marked dirty, 'c' when saved. Highlight the bullet list, it stays as 'd'. Won't be saved if you exit. Make some other arbitrary change, it becomes 'd', will be saved after 10 seconds or on exit. This ticket is about writing bad xml to disk, xml that prevents the user's note from being readable. |
Trying above steps with 760013f the note disappears and the console shows:
|
OK, I can produce bad xml, not by editing a note but by hand crafting a note that is valid, it gets re-saved as invalid. I'm assuming this is the same bug as you see, if nothing else, because I have to start somewhere. It does save bad xml so that is a bad thing by definition. |
OK, finally, I am sure I have fixed this bug. |
I mutated this ticket to the follow up bug as I was able to reproduce the "Note has no Title" message for a "lost note" in version 92cac7c (post 0.1alpha).
Steps to reproduce
Observation
From a user's perspective damaged notes should be hidden from standard search, but clicking a checkbox could make them visible to give users a chance to copy content to a new note. (if there are no damaged notes, this checkbox should not appear of course).
"Note has no title"
This issue confuses me since #2, because when this note "disappeared" the file stayed and is since warned about on startup:
This is the exact note content:
From a first spot it looks correct, but I could narrow it down to the line
With a deeper look the
<size:small>
tag spans the</list-item>
and breaks the note parser.I don't know how but somehow I managed to break the list syntax by clicking on the 'small' button in the font submenu. Will try to reproduce it later.
The text was updated successfully, but these errors were encountered: