fix: escape/textify the contents of inline and block code (#954)

This commit is contained in:
Daniel Roe 2023-01-11 16:24:13 +00:00 committed by GitHub
parent 24d43699bb
commit f9509f8987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 1 deletions

View file

@ -40,6 +40,27 @@ exports[`content-rich > custom emoji 1`] = `
exports[`content-rich > empty 1`] = `""`;
exports[`content-rich > handles html within code blocks 1`] = `
"<p>
HTML block code:<br />
<pre lang=\\"html\\">
&lt;span class=&quot;icon--noto icon--noto--1st-place-medal&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;icon--noto icon--noto--2nd-place-medal-medal&quot;&gt;&lt;/span&gt;</pre
>
</p>
"
`;
exports[`content-rich > inline code with link 1`] = `
"<p>
Inline code with link:
<code
>https://api.iconify.design/noto.css?icons=1st-place-medal,2nd-place-medal</code
>
</p>
"
`;
exports[`content-rich > link + mention 1`] = `
"<p>
Happy