]> git.lyx.org Git - features.git/commit
Do not corrupt documents without newline at EOF
authorGeorg Baum <baum@lyx.org>
Thu, 29 May 2014 11:15:07 +0000 (13:15 +0200)
committerRichard Heck <rgheck@lyx.org>
Thu, 29 May 2014 15:28:04 +0000 (11:28 -0400)
commit76417c7326a9ad6822e0351f565000ecc950d636
tree2ea2b07379e97e4f4a412fa670ba476cae115b25
parentb851a60376737a71aac8c7ebe9d9e7ab5f15fe1f
Do not corrupt documents without newline at EOF

trim_eol() assumes that a line always ends either with \n, \r, or \r\n.
This assumption is always valid except for the last line of a document, since it
may miss the trailing newline. LyX does not create such documents, bu they may
result from automatic creation tools, and LyX can read them, so lyx2lyx should
be able to read them as well.
(cherry picked from commit c75c6e446a8bc0dbaabaf156c0abfd622c050129)

Fix the fix

MAC-style (pre-OS X) line ends were not recognized anymore
(cherry picked from commit 55af9cb006563032e35fcc8bc5c8c1284c0344da)
lib/lyx2lyx/LyX.py
status.21x