-
Notifications
You must be signed in to change notification settings - Fork 80
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
Preserving indents and consecutive newlines #44
Comments
Hey @daeh , Thanks for the kind words! I'm afraid this change would be too complicated to implement the way you expect it to work. Evernote generates many meaningless tags that I intentionally skip or remove from the original note to get a clean Markdown. And this is important for users that don't use plain text editors to work with Markdown. Furthermore, this could work fine with a very basic markup done via Evernote tools. Still, many people use Evernote web clipper to capture content from the websites and rendering correct whitespaces for such content will require a headless browser under the hood, which is not an option. As for the example, some tags could represent the semantics of the content better than whitespace. Exactly three lines between line 1 and line 5 could be represented as a table:
Different indentation levels are best reflected in lists.
I will keep this issue opened for some time to see if this interest in this problem. So far, the use case looks pretty narrow; only people that use Typora editor, write the notes in Evernote manually and rely on whitespaces in the notes would benefit from this feature. |
+1 The combination of I will add that sometimes Evernote leaves out the
becomes this:
My solution for now has been to comment out the extra newline for divs in It seems to me that the better long-term solution would be for Another possibility is for evernote2md to simply strip the For padding/indentation, what if |
I agree that this problem should be handled. I don't see a reason for the For anyone interested, a workaround for this would be to first replace all Here are the substitutions I used: /\n\n(?!%)/gm -> "\n"
/\n%br%/gm -> "" Of course, this method doesn't cover all the cases, but I think it reduces manual intervention by a lot. |
Context
I just found this repo and it looks really useful. I'm curious about the feasibility of preserving the whitespace features of evernote files.
I made heavy use of indents and consecutive line breaks in evernote. Would it be possible to preserve the whitespace features of the CDATA? It shouldn't cause any problems for vanilla markdown editors but would allow editors like Typora to use the information.
E.g. when evernote2md processes this CDATA code:
it currently generates this markdown:
whereas it would be fantastic if it generated this instead:
Does this seem like a possible enhancement?
The text was updated successfully, but these errors were encountered: