Skip to content

Commit 4bd5cd8

Browse files
authored
Merge pull request #1 from khawkins98/main
bug: use html parser for output, bump version
2 parents e270535 + 0d870c0 commit 4bd5cd8

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ story.
77

88
## Requirements
99

10+
### Storybook 10.x
11+
12+
Use version 9.x of this addon.
13+
1014
### Storybook 9.x
1115

1216
Use version 8.x of this addon.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@whitespace/storybook-addon-html",
3-
"version": "8.0.2",
3+
"version": "9.0.0",
44
"description": "A Storybook addon that extracts and displays compiled syntax-highlighted HTML",
55
"keywords": [
66
"storybook-addon",

src/withHTML.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ export const withHTML = (
3131
}
3232

3333
const prettier = await import('prettier/standalone');
34-
const prettierPluginBabel = await import('prettier/plugins/babel');
35-
const prettierPluginEstree = await import('prettier/plugins/estree');
34+
const prettierPluginHtml = await import('prettier/plugins/html');
3635

3736
code = await prettier.format(code, {
38-
parser: 'babel',
39-
plugins: [prettierPluginBabel, prettierPluginEstree],
37+
parser: 'html',
38+
plugins: [prettierPluginHtml]
4039
});
4140

4241
emit(EVENTS.CODE_UPDATE, { code, options: parameters });

0 commit comments

Comments
 (0)