Evernote Import - Code Blocks

Harald's Avatar


18 Nov, 2016 10:53 PM

First of all.. I love the bear app. But I have a one issue with the evernote import. Code blocks are not imported correctly. I've got 150 notes. Most of them with code. It would be really cool, if this will be fixed :)


  1. Support Staff 1 Posted by Danilo Bonardi on 19 Nov, 2016 02:00 PM

    Danilo Bonardi's Avatar

    Hi Harald,

    can you send me and example of one exported note with code block as .enex ? I'll try to fix this problem for next week release.


  2. 2 Posted by Harald on 19 Nov, 2016 03:49 PM

    Harald's Avatar

    Hey Danilo,

    sure thing. enex is is attached.
    Thanks for the fast response!


  3. 3 Posted by Harald on 05 Mar, 2017 05:54 PM

    Harald's Avatar

    Hi Danilo,
    Thanks for implementing this feature that quick.
    But codeblock import doesn't work in 1.0.6 anymore :(


  4. Support Staff 4 Posted by Danilo Bonardi on 06 Mar, 2017 08:50 AM

    Danilo Bonardi's Avatar

    Hi Harald,

    you mean the example you send me does not work anymore?


  5. 5 Posted by Alvaro on 26 Aug, 2018 10:54 PM

    Alvaro's Avatar

    Seems like the support for importing notes with code blocks is broken again. Please find a enex file with a sample note containing a code block

    Could you please take a look? Im migrating many notes with code blocks from evernote and I dont mind writing an XSLT to modify enex files to be correctly processed by Bear, but I dont know what is the expected format.


  6. Support Staff 6 Posted by Danilo Bonardi on 27 Aug, 2018 09:11 AM

    Danilo Bonardi's Avatar


    Yes, the enex code for blocks slightly changed compared to version 6 exports. Evernote's custom code block property has been moved from the begin of the style property to the end

    We'll work for a fix for the next version. If you want to manually fix this problem you have to identify the divs with the -en-codeblock:true; and make the begin of the div match this string <div style=\"-en-codeblock: true;

    Thanks for reporting this problem.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac