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

Adding Support for webclips and new codeblocks #210

Open
wants to merge 6 commits into
base: devel
Choose a base branch
from

Conversation

bordaigorl
Copy link
Owner

Attempt to add support for undocumented -en-paragraph, -en-webclip and -en-codeblock styles.
This tries to address issues #184, #190, #207.
This needs testing and may break in the future (because the features it's trying to support are undocumented and subject to changes).
Any report of testing most welcome.

They could have used `<pre>`, they could have introduced an `<en-codeblock>` element.
But no. They choose a custom CSS style `-en-codeblock:true`.

This is obviously fragile.
Two problems:

1. distinguishing styled divs that are made by user (so may contain markdown) and the ones produced by webclips which need to be copied verbatim
2. avoid fooling markdown2 which does not tag matching to find boundaries of HTML so it gets confused with nested divs

Problem 1 is solved by looking for the `-evernote-webclip` style (not documented)
Problem 2 is solved by using verbatim output for webclip contents, and prepending a space to each line so that nested `</div>` are ignored.
@bordaigorl bordaigorl changed the title New codeblocks Adding Support for webclips and new codeblocks Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant