Jump to content
RichardG63

Converting a block of text to a code block adds 2 line breaks

Recommended Posts

Hi,

I'm a windows Evernote 6.17.5.8273 (308273) user and have the following happen consistently.

If I convert a single or multi line text block to a code block (select text and press ctrl+shift+L or click "Code Block" button on toolbar) the text is converted into a code block with 2 trailing line breaks within the code block. So every time I copy and paste a code block in I have to delete those trailing lines to keep the formatting of my documents neat.

Does anyone else experience the same issue?

I am copying from Edge or Chrome but even if I 'clean' the text by pasting & copying via Notepad I get the same effect.

Does anyone have any idea why this is happening or if there's anything I can do about it?!

THANKS

Share this post


Link to post

Yes I have the same issue - Mac user - Version 7.8 (457453 Direct)

Share this post


Link to post

I've just worked out an elegant but cumbersome solution to this problem.

Instead of pasting the text block, selecting it, and then changing it to a code block, it's easier to create a code block and then paste the textblock into it. Doing it this way doesn't result in those unexpected line breaks.

Still interested to hear whether other users are experiencing this problem...

Share this post


Link to post

Sure, I see it. Don't know of any way around this, and don't recall seeing it before the recent 6.17.3.8255 (308255) Prerelease (CE Build ce-62.0.7477) prerelease that I'm using on this machine (I think I need to update to the GA version). I don't use code blocks all that often even though I am a coder.

In any case, I'd think that the phrase "elegant but cumbersome" would be something of an oxymoron... :) 

Share this post


Link to post

Yup.  I can confirm that converting text to code block includes two free line breaks,  but creating a block and pasting the text works fine.  Odd.  I flagged this in the release thread too..

 

Share this post


Link to post

Not sure if I should mention this here, but since we are on the topic of issues with code... there is no longer any way to indent the code block.

Share this post


Link to post

Yes, it happens for me too. As RichardG63 said creating a code block first and then pasting text into it, does not result in extra lines. However, for me, I noticed that if I create a code block first, I then have to adjust the space above and below a code block.

Share this post


Link to post

Thanks all good to know it's not just me.

Another day, another Evernote bug! At least there's a convenient workaround for the time being...

Share this post


Link to post

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...