Skip to content

json5 embedded in markdown gets treated as js (quotes removed) #4611

@Haroenv

Description

@Haroenv

Prettier 1.13.3
Playground link

--parser markdown

Input:

```json5
{
  "name": "babel-core",
  "concatenatedName": "babelcore",
  "downloadsLast30Days": 10978749,
  "downloadsRatio": 0.08310651682685861,
  "humanDownloadsLast30Days": "11m",
  "popular": true,
  "version": "6.26.0",
}
```

Output:

```json5
{
  name: "babel-core",
  concatenatedName: "babelcore",
  downloadsLast30Days: 10978749,
  downloadsRatio: 0.08310651682685861,
  humanDownloadsLast30Days: "11m",
  popular: true,
  version: "6.26.0"
}
```

Expected behavior:

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:jsonIssues affecting JSONlocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions