Improve whitespace in diagnostics popup #167
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #105
Currently, descriptive text just sits in the parent element and cannot be targeted with CSS without also affecting code snippets. This PR solves that by wrapping it in a
div.text
.However, if there is a newline between
div
s it is rendered as a blank line. This shouldn’t happen in regular HTML or Markdown, but this isn’t regular. This causes two problems:\n
before adiv
. Fenced Code blocks should be followed by a newline so that’s ensured when the block is added.I had a little side-issue with any text after a
\r\n
not being rendered. I dunno why, also don’t know why there would be a\r\n
, must be something to do with TypeScript being a Microsoft thing and giving us Windows line endings or something. It also caused double newlines to not be respected. I solved that by converting\r\n
to\n
.Content in a
div.text
is now also rendered with a sans-serif font.Before
After
PS. My fork seems a bit messy, I’ll clean that up in a second.