shikijs / twoslash

You take some Shiki, add a hint of TypeScript compiler, and 🎉 incredible static code samples
https://shikijs.github.io/twoslash/
MIT License
1.06k stars 51 forks source link

Escape HTML in error message/recommendation #151

Closed calebeby closed 2 years ago

calebeby commented 2 years ago

When error titles/descriptions/recommendations have angle brackets in them, they don't display correctly because they are not escaped. In my case, the error.recommendation property had angle brackets in it because the message contained generics.

This PR escapes the text in those positions, so they display correctly.

changeset-bot[bot] commented 2 years ago

🦋 Changeset detected

Latest commit: aa047ea18e241eeeae890d39378e03a7bbe1c9cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages | Name | Type | | -------------------------------- | ----- | | remark-shiki-twoslash | Patch | | docusaurus-preset-shiki-twoslash | Patch | | eleventy-plugin-shiki-twoslash | Patch | | gatsby-remark-shiki-twoslash | Patch | | hexo-shiki-twoslash | Patch | | markdown-it-shiki-twoslash | Patch | | twoslash-cli | Patch | | vuepress-plugin-shiki-twoslash | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

orta commented 2 years ago

This makes sense to me - thanks!