I’m struggling with making code-snippets nice for our developers.
Both the code and highlight macros, and github flavoured markdown seem to balk at script tags in jsx/tsx as used in react, and can’t save code with those tags in them.
e.g. this fails:
import React from 'react';
type RootLayoutProps = {
children: React.ReactNode;
};
export default async function RootLayout({
children,
}: Readonly<RootLayoutProps>) {
return (
<html lang="en">
<head>
<Script
strategy="beforeInteractive"
id="sss"
type="text/javascript"
></Script>
</head>
</html>
);
}
4 posts - 2 participants