Skip to content

Commit

Permalink
Merge pull request #247 from FormidableLabs/208-add-json-to-the-defau…
Browse files Browse the repository at this point in the history
…lt-included-languages

add json to the default included languages
  • Loading branch information
acharyakavita authored Aug 14, 2024
2 parents e35950e + c5f2b5d commit f87355c
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/sweet-kiwis-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"prism-react-renderer": minor
---

'Add JSON as default supported language'
27 changes: 27 additions & 0 deletions packages/demo/src/sample-code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,31 @@ impl GroceryItem {
}
`,
},
["JSON"]: {
language: "json",
code: `
{
"id": 1,
"name": "John Doe",
"email": "[email protected]",
"address": {
"street": "123 Main St",
"city": "San Diego",
"state": "CA",
"zip": "12345"
},
"phoneNumbers": [
{
"type": "home",
"number": "555-123-4567"
},
{
"type": "work",
"number": "555-901-2345"
}
],
"interests": ["reading", "hiking", "coding"]
}
`,
},
}
1 change: 1 addition & 0 deletions packages/generate-prism-languages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const languagesToBundle = <const>[
"cpp",
"markdown",
"python",
"json",
]

/**
Expand Down

0 comments on commit f87355c

Please sign in to comment.