thedavegray 0 Posted March 4, 2020 Posted March 4, 2020 Hello, I pasted some C# code from Visual Studio into a new note complete with spacing and tabs. However when I go back and look everything is left aligned. I thought the code block was supposed to honour the formatting. Is this not the case? Thanks
Level 5* jefito 5,598 Posted March 4, 2020 Level 5* Posted March 4, 2020 NOte: your attachments didn't come through. 33 minutes ago, thedavegray said: pasted some C# code from Visual Studio into a new note complete with spacing and tabs. However when I go back and look everything is left aligned. I thought the code block was supposed to honour the formatting. Is this not the case? Tab characters don't really exist in Evernote (being based on a HTML-ish language). So Evernote currently just replaces them with 4 spaces. Since I don't use tabs in my code (4 spaces for me, too), this all works out fine for me. The alternative would be to use some kind of CSS trick to enforce tab indentation. Could work, I suppose, and it may be that they've tried it before,. But of course, if you do that, then you can't cursor through the indents in the same way you can via tabs. I don't know how far Evernote intended to honor formatting in code blocks. It's definitely on the 'lightly' end of the spectrum. Is this Windows? Mac? 1
thedavegray 0 Posted March 4, 2020 Author Posted March 4, 2020 Hi Jeff, Thanks for your detailed response. I'm not specifically setting tabs or spaces as Visual Studio does all that and however you format it does it's own thing. I may just paste code into a text editor en-route to Evernote in future. This is on Windows 10 with Evernote running in Chrome browser as opposed to the Windows app. Thanks
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now