sublime-evernote
sublime-evernote copied to clipboard
Nested list markdown rendering
The html2text
library seems to bail on nested lists, adding an extra list item character (*
) and extra spaces at the beginning of the first LI
element of any nested list.
Can you give an example (HTML contents of note and converted text)? I run a simple test and it seems to work. Specifically, I tried creating a note from the webapp with nested lists (numbered and unnumbered) and open it from ST. It all seemed to work fine...
Hey, just wiped my local copy and re-downloaded 2.5.2
and after a few tests, I'm convinced: you're correct, it appears to be fixed. I guess my Package Control maneuvers were somehow flawed previously (something cached in ST3 or in my User package maybe? not sure). Sorry for the false alarm — I'll reopen if I encounter this again, but disregard in the meantime.
@brynbellomy I'm having the same problem, see #66 . What did you do to resolve it? Reinstall sublime-evernote
? Reinstall package control
? Reinstall sublime
?
I used package control to remove sublime-evernote
and then install it again, but I'm still having the same problem. Package list shows I'm on version 2.5.4
.
The problem only shows up with notes created in the desktop app (OS X in my case) whereas notes created in the browser are converted properly
Heres the result from converting a note from the browser
---
title: This is a test using the browser
tags: []
notebook: My Standard Notebook
---
* I want to see how nested lists come out
* 1 level
* blah
* blah
* then again
* i have
* more
* stuff...
* to say
and what you get from converting a note created in the OS X app
---
title: This is a test using the OS X App
tags: []
notebook: My Standard Notebook
---
* I want to see how nested lists come out
* * 1 level
* * blah
* blah
* then again
* * i have
* * more
* * stuff...
* to say
@halhenke Ah! Thanks a lot for your report, now it's clear why I was not able to reproduce the issue!
It looks that the OSX client encodes many things in non-standard (or plain ackward) ways that make it less compatible with other clients. See for example #67. What a shame.
I do not have access to OSX so to fix this I need your assistance. Could you please do the following:
- enable the
debug
setting - open the note that is causing the conversion to fail
- open Sublime's console and copy the HTML code that is received from the server
- Paste it here removing any sensitive information
I'll have a look and then I can see if we can fix this once for all.
Thanks for your cooperation!
Sorry for the delay in getting back to you.
Heres what I got in the console from the browser created note:
Evernote: <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note><ul><li>I want to see how nested lists come out<ul><li>1 level<ul><li>blah</li><li>blah</li></ul></li><li>then again<ul><li>i have<ul><li>more<ul><li>stuff...</li></ul></li><li>to say</li></ul></li></ul></li></ul></li></ul></en-note>
Evernote: 261f359d-a47b-4e96-9742-124b1c161369
Evernote: Conversion ok
And here is what I got from the OS X created note:
Evernote: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note>
<ul>
<li>I want to see how nested lists come out</li>
<li style="display:inline;list-style:none;">
<ul>
<li>1 level</li>
<li style="display:inline;list-style:none;">
<ul>
<li>blah</li>
<li>blah</li>
</ul>
</li>
<li>then again</li>
<li style="display:inline;list-style:none;">
<ul>
<li>i have</li>
<li style="display:inline;list-style:none;">
<ul>
<li>more</li>
<li style="display:inline;list-style:none;">
<ul>
<li>stuff...</li>
</ul>
</li>
<li>to say</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</en-note>
Evernote: 3c602897-a8f1-4e93-8bcc-a543ffb6f5c2
Evernote: Conversion ok
So looks like there is some inline CSS that is causing the problem?
Just wanted to let you guys know that this problem seems to be fixed in the latest release of the Evernote (6.0.13) for OS X client.
New notes with nested, unordered lists do not have the extra asterisks. Old notes still do but if you update them in the client then the notes formatting will be fixed upon syncing again.
Thank Christ because its so useful to be able to open up a note in ST & insert some syntax highlighted code or just edit with a full featured editor...
Anyway thanks for a great plugin.
Very good to know! Thanks a lot @halhenke
Yes!!! It's so rare to get this sort of feeling of closure from the internet!