Jump to content

Bugreport: New autoformatting messes with Codeblocks


Go to solution Solved by Benito Epominati,

Recommended Posts

The recently introduced autoformatting of characters combinations like "->" to an arrow symbol seems to interfere with the content of codeblocks to the degree that the displayed code might no longer be valid in the strict sense. The content of codeblocks should remain unaltered. For instance, the following Julia code...

filter(i -> iszero(i[2]) != true, dataset)

becomes...

image.png.c48166446b831830990d7ba8f193c8c4.png

which is unfortunate. Another example would be...

select(df, 1 => "Date", :Country_code => "C-Code")

is changed to

image.png.3308171ffeb43f8dca469b6c28994a5e.png

 

Please fix.

Thanks.

Ben

 

System info:

Win 10
10.81.4-win-ddl-public (20240320152323)
Editor: V 177.9.4
Service: V 1.97.1
 

Link to comment
  • Level 5*
58 minutes ago, Benito Epominati said:

The recently introduced autoformatting of characters combinations like "->" to an arrow symbol seems to interfere with the content of codeblocks to the degree that the displayed code might no longer be valid in the strict sense. The content of codeblocks should remain unaltered

Apparently work is being done on the code block so hopefully this will be removed.  It has been reported that though this seems like it could be a problem, when copied back into an IDE it does render correctly and is not an issue.

  • Like 2
Link to comment

One "interesting" feature is that the code block and inline text converts <= and >= into the correct mathematical symbol but leaves it untouched in the main body of the note. This is exactly the opposite of the behaviour I would expect.

My main use of EN code blocks is to store important snippets of code, and although it looks weird, it does always copy back to my IDE correctly.

  • Like 2
Link to comment

I can confirm the above: When copied to and fro the snippets are always correct. Also, Evernote on iPhone displays no symbols in the codeblock (but I have not tested this extensively). So, this very likely a front end issue specific to the desktop client.

Interestingly enough, in the codeblock more symbols get converted than in the text body:

image.png.a535869b04481bc694741bbf5e38f132.png

  • Like 3
Link to comment
  • 3 weeks later...

This naturally is not a top tier issue to clean up. However, I trust, that they do it at some point. They building up a good track record for cleaning things up and implementing new features at the same time. Makes a good argument for a premium subscription.

  • Like 2
Link to comment
  • 1 month later...
  • Solution
Posted (edited)

Fixed in Evernote 10.91.1* with the update that formats and highlights code blocks. Well done, Evernote!  Now please add Julia to the list of supported languages. I mean, you already added Haskell... 🙂 

* 10.91.1-win-ddl-public (20240604023825)
Editor: V 178.10.0
Service: V 1.109.4

 

Update: Although the automatic reformatting of -> etc. has been removed, the font used, still causes minor issues. Namely, the ampersand symbol for e.g. && boolen operators etc. is set in a font that is typically only used for comments. See example below.

image.png.82bdaed260833ab5546cd9fd0ce5e1d0.png

Edited by Benito Epominati
Updated Information about formatting
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...