tomboy-notes / tomboy

This is the legacy development for Tomboy.
http://projects.gnome.org/tomboy
GNU Lesser General Public License v2.1
126 stars 25 forks source link

Possible bug in ExportToHtml.xsl respect to line breaks #93

Open xmarti6 opened 6 years ago

xmarti6 commented 6 years ago

I like this note-taking app very much, but I found out that when converting all notes to HTML I was not able to copy/paste HTML data into other apps like Word via clipboard (further, Word could not render the HTML file correctly; line breaks not respected). After lot of time digging into it I discovered hat by changing "#xA" charcode to "x2028" in the "softbreak" rule within "ExportToHtml.xsl" xml transform file I was able to obtain an HTML file for which when I copied notes and pasted them to Word, for instance, all style format and line breaks are preserved correctly.

Indeed, I dont know exaclty what the change in "#xA" charcode to "x2028" means, but I lighted my head up when I saw similar code in this thread "https://stackoverflow.com/questions/3309746/how-to-convert-newline-into-br-with-xslt" , and I was lucky this change made the effect I was looking for.

I just hope this can serve to improve the code if you consider this a bug.

Many thanks Xavi

davidbannon commented 6 years ago

xmarti6, I don't think anyone is in a position to make changes to the Tomboy code right now. You just might do better if you presented your suggestion as a (git) pull request, that is, coded up so whoever does have write permission to the Tomboy repo can easily accept it. But probably not.

Incidentally, the next release of tomboy-ng will have the ability to export notes in rtf - I think that might be a more appropriate way to get a note into (eg) Word. A couple of weeks or you could build right now from git source.

David

On 07/03/18 02:52, xmarti6 wrote:

I like this note-taking app very much, but I found out that when converting all notes to HTML I was not able to copy/paste HTML data into other apps like Word via clipboard (further, Word could not render the HTML file correctly; line breaks not respected). After lot of time digging into it I discovered hat by changing "#xA" charcode to "x2028" in the "softbreak" rule within "ExportToHtml.xsl" xml transform file I was able to obtain an HTML file for which when I copied notes and pasted them to Word, for instance, all style format and line breaks are preserved correctly.

Indeed, I dont know exaclty what the change in "#xA" charcode to "x2028" means, but I lighted my head up when I saw similar code in this thread "https://stackoverflow.com/questions/3309746/how-to-convert-newline-into-br-with-xslt" , and I was lucky this change made the effect I was looking for.

I just hope this can serve to improve the code if you consider this a bug.

Many thanks Xavi

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tomboy-notes/tomboy/issues/93, or mute the thread https://github.com/notifications/unsubscribe-auth/AF__MPOsEEvgBjd1ErqB4Dc37Chmj2zDks5tbrCugaJpZM4Se8rj.

xmarti6 commented 6 years ago

Hi David,

It's a pitty, I don't have time to go into the Git/developer world, but I'm glad to know I could share this experience with you and the rest. This modification works, I can export Tomboy notes to HTML and then copy the text I want to Word respecting the entire format. If it cannot be implemented/tested is sad, but at least is written somewhere in the cloud if others need to.

Best wishes with your new Tomboy branch "ng", we will give it a try, cheers! Xavi