-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
HTML generated for code blocks can be improved (and shortened) #74180
Comments
Knowing nothing about the generation, seems it's just applying a different "keyword" style to |
Thanks for the clarification! Then this span is not an issue. :) |
Another question worth raising is whether whitespace should be ignored when merging spans. That is, if: <span class="op">=</span> <span class="op">-</span> could become <span class="op">= -</span> I think it should be fine as long as the styles do not alter the font size in ways it would change how spaces look (same for tabulators/newlines). Also, |
Normally it depends on the font, so we use the same font in span, it should keep the spaces. Also in the case you showed, they're not directly following each other, but it might be interesting to merge them. As for But this is a lot of good ideas, thanks for bringing them up! |
#73807 might fix this. |
At least improve the situation. I'll take another look once it'll merged to see if there is still weird DOM. |
For example, we can have occurrences of:
In this case, we could simply have:
We also have some weird generation sometimes:
In this case, I'm not sure what
<span class="kw-2">&</span>
is actually doing...The text was updated successfully, but these errors were encountered: