Skip to content

don't include semi in JSX only code blocks in markdown  #3196

@chrisdrackett

Description

@chrisdrackett

I'm using prettier with a project that uses react styleguidist to document components (docs here: https://react-styleguidist.js.org/docs/documenting.html)

when including just JSX in a codeblock it would be nice if prettier would exclude the leading (or following depending on your --no-semi setting) from the output

Prettier 1.8.1
Playground link

--parser markdown
--no-semi

Input:

```js
<Button>label</Button>
```

Output:

```js
;<Button>label</Button>
```

Expected behavior:

```js
<Button>label</Button>
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:multiparserIssues with printing one language inside another, like CSS-in-JSlang:javascriptIssues affecting JSlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions