Skip to content

Commit 7ebf257

Browse files
Merge pull request #230 from FormidableLabs/fix/markup
Fix HTML preset not highlighting script tags
2 parents 9c041df + 3c38d98 commit 7ebf257

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.changeset/dry-icons-repeat.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"prism-react-renderer": patch
3+
---
4+
5+
Fix html language preset by using markup instead.

packages/demo/src/sample-code.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ const GroceryItem = new Proxy({}, {
5656
@property (nonatomic, assign) float price;
5757
@property (nonatomic, assign) NSInteger quantity;
5858
59-
- (instancetype) initWithName: (NSString *)name
60-
price: (float)price
59+
- (instancetype) initWithName: (NSString *)name
60+
price: (float)price
6161
quantity: (NSInteger)quantity;
6262
6363
@end
6464
6565
@implementation GroceryItem
6666
67-
- (instancetype) initWithName: (NSString *)name
68-
price: (float)price
67+
- (instancetype) initWithName: (NSString *)name
68+
price: (float)price
6969
quantity: (NSInteger)quantity {
7070
self = [super init];
7171
if (self) {
@@ -88,6 +88,10 @@ const GroceryItem = new Proxy({}, {
8888
<head>
8989
<meta charset="UTF-8" />
9090
<title>Formidable</title>
91+
<script>
92+
const name = "Formidable";
93+
console.log(name);
94+
</script>
9195
</head>
9296
<body>
9397
<div id="root"></div>

packages/generate-prism-languages/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { languages as prismLanguages } from "prismjs/components"
77
import uglify from "uglify-js"
88

99
export const languagesToBundle = <const>[
10+
"markup",
1011
"jsx",
1112
"tsx",
1213
"swift",
@@ -20,7 +21,6 @@ export const languagesToBundle = <const>[
2021
"go",
2122
"cpp",
2223
"markdown",
23-
"html",
2424
"python",
2525
]
2626

0 commit comments

Comments
 (0)