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

Converted EN code blocks should not escape characters #189

Open
luckman212 opened this issue Jan 26, 2021 · 6 comments
Open

Converted EN code blocks should not escape characters #189

luckman212 opened this issue Jan 26, 2021 · 6 comments

Comments

@luckman212
Copy link

  • yarle v3.8.2 (run from npx)
  • npm 7.4.3

I am really happy to have this tool, thank you 🙏

My notes make heavy use of code blocks, and I am finding the converted notes need a lot of cleanup, because characters such as _ or [ get escaped as \_ or \[ — even though they are contained within fenced code blocks ``` in markdown.

At this point I am just deleting the code blocks after conversion, then copy/pasting them from Evernote into Obsidian using ⌘+⇧+V which avoids the escaping...

@joaosa
Copy link
Contributor

joaosa commented Jan 27, 2021

Have you tried setting keepMDCharactersOfENNotes to true? 😄

@luckman212
Copy link
Author

Thanks @joaosa - I thought that option was meant to indicate that I wrote my EN notes in markdown format. Maybe I mis-understood that. Anyway, I did have better success with these options set like so in my config:

"monospaceIsCodeBlock": false,
"keepMDCharactersOfENNotes": true

@akosbalasko
Copy link
Owner

akosbalasko commented Jan 29, 2021

Hi @luckman212 ,
Your settings looks fine, keepMDCharactersOfENNotes specifies that if you used MD syntax in your EN notes, then they won't be escaped (I think even within code-blocks, right? ), and setting monospaceIsCodeBlock to false will recognize the EN codeblocks, not the 'legacy' solution in EN when the codeblocks were denoted by setting their font to monospace. Is there anything else you recognized that the converter processes wrongly?

@luckman212
Copy link
Author

Thanks @akosbalasko - it's doing a very good job. I need to look into the Templates more to see about customizing that. But, one thing off the top of my head: "naked" URLs are getting converted like this (example)

Evernote:

Google: https://www.google.com

After conversion with Yarle:

Google: <https://www.google.com>

So, just the extra < and > ... not sure if it can be avoided...

@medmunds
Copy link
Contributor

Fix for extra escaping in code blocks (with keepMDCharactersOfENNotes at default false) is in PR #281.

@bumper314
Copy link
Contributor

Related to this issue, Evernote allows code blocks to have formatting, which can be really ugly when converted to Markdown, so it would be nice to have an option to convert code blocks to plain text.

Screen Shot 2024-01-21 at 12 53 22

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

No branches or pull requests

5 participants