Skip to content

Commit

Permalink
Merge pull request #230 from FormidableLabs/fix/markup
Browse files Browse the repository at this point in the history
Fix HTML preset not highlighting script tags
  • Loading branch information
carloskelly13 committed Nov 11, 2023
2 parents 9c041df + 3c38d98 commit 7ebf257
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-icons-repeat.md
@@ -0,0 +1,5 @@
---
"prism-react-renderer": patch
---

Fix html language preset by using markup instead.
12 changes: 8 additions & 4 deletions packages/demo/src/sample-code.ts
Expand Up @@ -56,16 +56,16 @@ const GroceryItem = new Proxy({}, {
@property (nonatomic, assign) float price;
@property (nonatomic, assign) NSInteger quantity;
- (instancetype) initWithName: (NSString *)name
price: (float)price
- (instancetype) initWithName: (NSString *)name
price: (float)price
quantity: (NSInteger)quantity;
@end
@implementation GroceryItem
- (instancetype) initWithName: (NSString *)name
price: (float)price
- (instancetype) initWithName: (NSString *)name
price: (float)price
quantity: (NSInteger)quantity {
self = [super init];
if (self) {
Expand All @@ -88,6 +88,10 @@ const GroceryItem = new Proxy({}, {
<head>
<meta charset="UTF-8" />
<title>Formidable</title>
<script>
const name = "Formidable";
console.log(name);
</script>
</head>
<body>
<div id="root"></div>
Expand Down
2 changes: 1 addition & 1 deletion packages/generate-prism-languages/index.ts
Expand Up @@ -7,6 +7,7 @@ import { languages as prismLanguages } from "prismjs/components"
import uglify from "uglify-js"

export const languagesToBundle = <const>[
"markup",
"jsx",
"tsx",
"swift",
Expand All @@ -20,7 +21,6 @@ export const languagesToBundle = <const>[
"go",
"cpp",
"markdown",
"html",
"python",
]

Expand Down

0 comments on commit 7ebf257

Please sign in to comment.