Closed bibimbop closed 11 years ago
I'm not reproducing this. Please attach the text file. (I'll use a folder of pngs I have around).
I can reproduce with:
If I don't move the cursor, then the document is properly converted, and the /F F/ are gone. If I move the cursor, then it's broken.
Thank you, with the more detailed description I have duplicated it with a small test document. My jaw has dropped. Note it isn't merely "lots of p tags" -- large parts of the text have disappeared! I cannot imagine how changing the cursor position before html convert can do this. It will be very interesting to find out... stay tuned.
commit dc44a40
This was a continuation of the issue with allowing F/
(end of document) instead of requiring at least one newline after it. The bug could only occur if some end-of-markup (F/
, T/
, Q/
etc) fell at end of document. The html convert for end-of-markup tried to position the cursor at that line plus the length of that line. That works on all but the last line. There it fails with an error message (which would have been visible on the terminal window) about QTextCursor positioned out of range.
The cursor, which was a copy of the document cursor, would not be repositioned. The next step was to "drag" from the current position to the start of the markup line. Instead of selecting the end-of-markup line, this would select from some random spot in the middle of the document to the start of the last line. The selected text would then be replaced by </div>
or </table>
. All sorts of unpredictable random shit would follow, but this was where the damage was done.
Hmm! I don't see that commit. Last one was april 5th.
My bad - did everything else incl. making binaries, forgot to push to github. ok now.
I open a document, add /F F/ at the end, move the notes there, convert the notes to html. Finally when I convert to html the whole document, I get a lot of emtpy p, h2 tags at the top of the document.
If I remove the /F F/ before converting the whole document, then this problem disappears. However this creates another issue: the page markers towards the end of the book are lost or moved where they don't belong. This also seems random. In several tries, I saw once where the last hundred pages pointed all to the same png.