Spacing issues with <div></div> and <br/>
dge8 opened this issue · comments
I have a number of notes with some sort of paragraph structure:
This is a line.
This is another line in the same paragraph.
This is a new paragraph.
This paragraph has a second line too.
which appear in my .enex exports mostly like this:
<div>This is a line.</div>
<div>This is another line in the same paragraph.</div>
<div><br/></div>
<div>This is a new paragraph.</div>
<div>This paragraph has a second line too.</div>
and are then exported to Markdown with each line in a separate paragraph:
This is a line.
This is another line in the same paragraph.
This is a new paragraph.
This paragraph has a second line too.
To make things more difficult, occasionally one of the <div>
s is missing:
<div>This is a line.</div>
This is another line in the same paragraph.
<div><br/></div>
<div>This is a new paragraph.</div>
<div>This paragraph has a second line too.</div>
which then exports like this:
This is a line.
This is another line in the same paragraph.
This is a new paragraph.
This paragraph has a second line too.
I have worked around it for now by commenting out the extra newline for divs in godown.go
(line 362 (here)[https://github.com/wormi4ok/godown/blob/1bea1c1b0bac9b8a8980f3b23c980f785d4a1410/godown.go]) and manually re-splitting the lines on those few notes where the lines were combined because of missing <div>
s.
However, there must be a better solution - perhaps evernote2md ought to strip the <div>
tags before calling godown
, or perhaps godown
should leave newlines before and after <div>
s but remove overlapping line breaks immediately between them (like MS Word does with paragraph spacing), or something else...?
Latest evernote2md, Evernote 10.19.2-mac-mas-public (458754) on macOS 10.15.7 19H1323. Notes in question were created in 2014, so perhaps it's due to an older Evernote version.
Oops - duplicate of Issue #44, don't know how I missed that. Sorry!