From 3c38d9838df39c29c2910fdcc0a4f6a9ed4f7680 Mon Sep 17 00:00:00 2001 From: Carlos Kelly Date: Fri, 10 Nov 2023 16:59:16 -0800 Subject: [PATCH] Fix HTML preset not highlighting script tags by using the markdown preset top-level --- .changeset/dry-icons-repeat.md | 5 +++++ packages/demo/src/sample-code.ts | 12 ++++++++---- packages/generate-prism-languages/index.ts | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .changeset/dry-icons-repeat.md diff --git a/.changeset/dry-icons-repeat.md b/.changeset/dry-icons-repeat.md new file mode 100644 index 0000000..f12e657 --- /dev/null +++ b/.changeset/dry-icons-repeat.md @@ -0,0 +1,5 @@ +--- +"prism-react-renderer": patch +--- + +Fix html language preset by using markup instead. diff --git a/packages/demo/src/sample-code.ts b/packages/demo/src/sample-code.ts index 8328eea..8259546 100644 --- a/packages/demo/src/sample-code.ts +++ b/packages/demo/src/sample-code.ts @@ -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) { @@ -88,6 +88,10 @@ const GroceryItem = new Proxy({}, { Formidable +
diff --git a/packages/generate-prism-languages/index.ts b/packages/generate-prism-languages/index.ts index d6b1e86..977114a 100644 --- a/packages/generate-prism-languages/index.ts +++ b/packages/generate-prism-languages/index.ts @@ -7,6 +7,7 @@ import { languages as prismLanguages } from "prismjs/components" import uglify from "uglify-js" export const languagesToBundle = [ + "markup", "jsx", "tsx", "swift", @@ -20,7 +21,6 @@ export const languagesToBundle = [ "go", "cpp", "markdown", - "html", "python", ]