-
Notifications
You must be signed in to change notification settings - Fork 7
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
Carriage returns appear to be ignored #4
Comments
Hmm that's a weird issue. OneHighlighter doesn't do anything special when you paste in text. It's basically just a HTML |
That doesn't appear to be the case. I converted a file with unix line endings to DOS line endings (using unix2dos) and tried copying from directly within vim, choosing the Python highlighting, and pasting into OneNote. I did this on both the unix and DOS versions of the file but the output was still the same as described in the original issue. ... And as I was writing this I copied a section of python, chose OneHighlighter from the menu bar and left it on auto-detect. I don't know what it's auto-detecting as, but after I pasted it with that highlighting, the newlines were preserved as expected. This appears that it may just be a problem with the Python syntax highlighting, and indeed that is what I use most often. |
I just came across this issue with the C syntax highlighting as well. The native file I created (in a VM using vim) had CRLF line-endings. When I copied that from the VM, used OneHighlighter, then pasted it into OneNote, it was one huge glob of text with no line-endings. I then used dos2unix on the file (within the VM), copied the contents again, used OneHighlighter, then pasted into OneNote, and I get similar paste behavior as what I described with Python above. If I use unix2dos to convert LF to CRLF again, then go through the motions, the paste ends up being a glob of text again. Curious behavior. If I get the time I'd love to dig into this and do a PR. Just documenting what I can, for now. |
Hi @Savjee! I am loving this app, but I have found that if I copy from Vim on my Mac or from a Linux VM and then paste into OneNote, it will very often ignore blank lines which causes me to go insert them manually. Sometimes (but not always) the blank line appears to be replaced with a leading space at the beginning of the next line.
Have you experienced this or am I doing something wrong?
The text was updated successfully, but these errors were encountered: