Jump to content

Bug: Auto-formatting get wrongly applied in code block


Recommended Posts

Code blocks presumably exist for the purpose of including monospaced text such as source code in notes. It obviously needs to be displayed as-is, that's the whole point of the code block.

In some recent version of Evernote it appears to have started applying some auto-formatting inside code blocks, and replacing some characters. This doesn't happen at the time you type/paste the text, it affects when viewing notes which have existed for years.

For example I've just noticed this in one of my notes:

image.thumb.png.c05af8317c9ecad264aa55a68de1baf8.png

The actual text is:

= (or no operator): exact version equality
!=: version not equal
\>, >=, <, <=: version comparison
~>: pessimistic constraint, constraining both the oldest and newest version allowed. ~> 0.9 is equivalent to 
>= 0.9, < 0.10, and ~> 0.8.4 is equivalent to >= 0.8.4, < 0.9

This is obviously a problem - this is a reference note and the text of the code block needs to be displayed properly as-is, not with characters replaced by other glyphs.

I'm on Evernote v10.82.2-mac-ddl-public (20240327123857) on MacOS Sonoma 14.4.1
 

 

  • Like 2
  • Thanks 1
Link to comment
  • Level 5*

Hi.  This new behaviour has already been noted - best advice is to contact Evernote Support and wait for a response.  We're mainly other users here so no workarounds / fixes available that I'm aware of - except to use a dedicated code editor and attach the output file to your note for the time being.

We're told that highlighting and other features are coming to Evernote but it's unknown how you should approach your now-altered content,  and whether or how it can be returned to its original state.  If/ when you do receive some feedback from Evernote please post it here...

Link to comment

There's a possibility it may not get fixed because code blocks are getting an overhaul and will have some syntax highlighting introduced. Its been mentioned that possibly within the next couple of months.

I'm looking forward to it.

Link to comment
  • 1 month later...
On 4/17/2024 at 5:37 PM, gazumped said:

We're told that highlighting and other features are coming to Evernote but it's unknown how you should approach your now-altered content,  and whether or how it can be returned to its original state.

As feared by users like me who have always used code blocks in a way not linked with programming languages, the latest versions of EN on Mac and iOS (10.91.0) just released to the public include syntax highlighting for code blocks without offering any way to turn the feature off in settings.

Every single code block I have used in EN through the years has now become a visual mess.

Link to comment
  • Level 5*
20 minutes ago, Thorz said:

Every single code block I have used in EN through the years has now become a visual mess.

Don't see why that's the case - the code highlighting is meant to pick out the actual code;  unless you were using HTML or some other terms in your entries,  they should not be affected.  Even if they are the 'Auto' button gives you a choice of languages to run through.  I agree maybe "no highlight" should be one of the options,  but one of the others may help...  How about a screen shot to show what you mean? - And I'd recommend feedback to Evernote.com to make sure they get the memo...

Link to comment
31 minutes ago, gazumped said:

I agree maybe "no highlight" should be one of the options,

It already is - it's called plain text!

The problem comes when you use a code block for something other than one of the available languages. e.g. EN advanced search strings in a code block - EN decides on this occassion it is Visual basic

image.png.e72a4867ea8fbdfab1d97fa33fe5beb9.png

Change to plain text

image.png.d0d3cad1b59ee540694563d3600476fb.png

I understand from other posts that the spellchecking of code blocks is going to fixed fairly soon.

  • Like 1
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...