Quantcast
Channel: XWiki Forum - Latest topics
Viewing all articles
Browse latest Browse all 1373

Code snippets with

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 1373

Trending Articles