-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix markdown removal in hover handling whitespace weirdly #13988
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
Conversation
@bors r+ |
☀️ Test successful - checks-actions |
As mentioned in #10028, line wraps are also messed up. kak-lsp has implemented Markdown by now, so I have nothing set up to test this with right now, but looking at the code, I don't see anything changed in this regard. E.g. the original Markdown might use soft wraps to limit the line length to 100 columns, but when the client only has 80 columns to render the result, you'd get breaks mid-screen: # soft wraps at 100 columns
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eligendi non quis exercitationem culpa
nesciunt nihil aut nostrum explicabo reprehenderit optio amet ab temporibus asperiores quasi
cupiditate. Voluptatum ducimus voluptates voluptas?
# turned into hard breaks and rendered at 80 columns
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eligendi non quis
exercitationem culpa
nesciunt nihil aut nostrum explicabo reprehenderit optio amet ab temporibus
asperiores quasi
cupiditate. Voluptatum ducimus voluptates voluptas? This would also bring it in line with how Markdown is rendered into HTML:
Browsers then turn a softbreak into a single space character: # soft wraps at 100 columns
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eligendi non quis exercitationem culpa
nesciunt nihil aut nostrum explicabo reprehenderit optio amet ab temporibus asperiores quasi
cupiditate. Voluptatum ducimus voluptates voluptas?
# turned into spaces and rendered at 80 columns
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eligendi non quis
exercitationem culpa nesciunt nihil aut nostrum explicabo reprehenderit optio
amet ab temporibus asperiores quasi cupiditate. Voluptatum ducimus voluptates
voluptas? |
Hm, so what should we do with softbreaks? Just ignore them? |
I'd turn them into spaces, like browsers do in HTML. |
Replace soft breaks in markdown with spaces cc #13988 (comment)
Fixes #10028