-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix render of literal to be rendered in codeblock #18795
Conversation
6ca6330
to
cb7f394
Compare
cb7f394
to
92f8fef
Compare
Added tests as part of same commit, they basically test the number of back ticks that is before and after. Nothing much can be done apart from that I guess. |
What if the string consists entirely of space characters?
e.g. ` ` (the rendered form of an empty string)
` ` (the rendered form of string " ", or 1 space) will become
|
Ah indeed, fully whitespace strings we need to special case thats a good point! |
We should do that, but fun thing in vscode hover renderer trims all leading and trailing spaces inside codeblock. Like even with current implementation hovering over something like |
That is unfortunate but not much we can do about then I think, ultimately markdown rendering differs from implementation to implementation. We could note down the number of leading / trailing whitespace in parenthesis after I suppose (if there are any) |
Is it possible to use |
From my research about it, VSC only allows |
Fixes #18765.
Chose this approach to simplify finding the needed n back ticks, instead of finding the consecutive back ticks.
Tested for about 100 consecutive back ticks, it was working fine.
Regarding tests, I'll add some soon. Just wanted to review the implementation.