Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested list markdown rendering #33

Open
brynbellomy opened this issue Jul 6, 2014 · 9 comments
Open

Nested list markdown rendering #33

brynbellomy opened this issue Jul 6, 2014 · 9 comments
Labels

Comments

@brynbellomy
Copy link

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.

@bordaigorl
Copy link
Owner

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...

@brynbellomy
Copy link
Author

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.

@tauren
Copy link

tauren commented Jan 12, 2015

@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.

@halhenke
Copy link

halhenke commented Apr 3, 2015

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

@bordaigorl
Copy link
Owner

@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:

  1. enable the debug setting
  2. open the note that is causing the conversion to fail
  3. open Sublime's console and copy the HTML code that is received from the server
  4. 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!

@bordaigorl bordaigorl reopened this Apr 3, 2015
@halhenke
Copy link

halhenke commented Apr 8, 2015

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?

@halhenke
Copy link

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.

@bordaigorl
Copy link
Owner

Very good to know! Thanks a lot @halhenke

@brynbellomy
Copy link
Author

Yes!!! It's so rare to get this sort of feeling of closure from the internet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants