Merge branch 'main' of github.com:sass/sass-site

* 'main' of github.com:sass/sass-site:
  Fix compatibility callouts in typedoc comments (#733)
This commit is contained in:
Jonny Gerig Meyer 2023-06-05 18:03:24 -04:00
commit 4c4051de20
No known key found for this signature in database

View File

@ -62,8 +62,14 @@ class SassSiteRenderContext extends DefaultThemeRenderContext {
const compatibilityArgs = parseCompatibility( const compatibilityArgs = parseCompatibility(
lineBreak === -1 ? text : text.substring(0, lineBreak), lineBreak === -1 ? text : text.substring(0, lineBreak),
); );
const rest = const restOfFirst =
lineBreak === -1 ? null : text.substring(lineBreak + 1).trim(); lineBreak === -1 ? null : text.substring(lineBreak + 1).trim();
const rest = [
...(restOfFirst ? [{ kind: 'text', text: restOfFirst }] : []),
...compat.content.slice(1),
];
return JSX.createElement(JSX.Raw, { return JSX.createElement(JSX.Raw, {
html: html:
`{% compatibility ${compatibilityArgs} %}` + `{% compatibility ${compatibilityArgs} %}` +