On Sat, Nov 26, 2016 at 12:50 PM, rengel <reinhard.engel...@gmail.com> wrote:
> I still don't understand why you are struggling with the newline characters at all. Many thanks for this. You have uncovered a blind spot in my thinking. So instead of clumsily preserving newlines *that it knows must end every line*, each importer will simply remove newlines with s.splitlines(False). That's the only per-importer change required! The code we have been discussing appears in the base Importer class. i.finalize_ivars, also in the base class, will restore trailing newlines like this: v._bodyString = ''.join[z+'\n' for z in v._import_lines] This is itself simpler than the existing code. This is way too good to miss. Because the changes affect the base Importer class, all new importers must be changed simultaneously. Existing unit tests should catch any mistakes. To be doubly careful, I may add a g.new switch to mark changed code. Maybe today... Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.