Skip to content

Markdown is automatically formatted, causing React syntax interpretation errors #3143

@Alan3344

Description

@Alan3344

I'm currently helping translate md documentation using docusaurus.io

This is part of the snippet. line:79-86
Able to be interpreted correctly:

import Card from '@site/src/components/card';
import { translate } from '@docusaurus/Translate';

export const GalleryCard = ({title, liveUrl, sourcesUrl, description, imageUrl}) => (
<Card>
<a className="gallery-live-link" href={liveUrl}>
<img src={"/img/gallery/" + imageUrl} className="screenshot-100"/>
<h2>{title}</h2>
<div className="gallery-description">{description}</div>
</a>
<div className="gallery-footer">
<a className="gallery-github-link" href={sourcesUrl} title="View source code"></a>
</div>
</Card>
);

able to be interpreted correctly:

import Card from '@site/src/components/card';
import { translate } from '@docusaurus/Translate';

export const GalleryCard = ({title, liveUrl, sourcesUrl, description, imageUrl}) => (
<Card>
<a className="gallery-live-link" href={liveUrl}>
<img src={"/img/gallery/" + imageUrl} className="screenshot-100"/>

<h2>{title}</h2>
<div className="gallery-description">{description}</div>
</a>
<div className="gallery-footer">
<a className="gallery-github-link" href={sourcesUrl} title="View source code"></a>
</div>
</Card>
);

This problem causes precompilation to fail.
image

MacOS Ventura 13.4.1
Both vscode and plug-ins are the latest versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lockedLocked due to inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions