digitalocean / do-markdownit

Markdown-It plugin for the DigitalOcean Community.
https://www.digitalocean.com/community/markdown
Apache License 2.0
85 stars 19 forks source link

Fix multi-line inline code styling #106

Closed MattIPv4 closed 6 months ago

MattIPv4 commented 6 months ago

Type of Change

What issue does this relate to?

cc #103

What should this PR do?

While #103 did fix the more prevalent issue of inline code in links becoming unreadable when hovered, that fix ended up breaking the less common situation of inline code spanning across a linebreak (due to the background now being a pseudo-element rather than an actual background).

To fix this, I've partially reverted the change the previous PR made, sticking to using just a regular old background for inline code, and have then changed how inline code inside a link gets styled to use multiple background layers to combine the link treatment with the inline code background seamlessly.

What are the acceptance criteria?

I have been using this snippet to test:

`this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code.` this is not inline code

[`this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code. this is a really long bit of inline code.` this is not inline code]()
image image