Skip to content

Commit

Permalink
do not parse attributes ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmajor committed Apr 19, 2024
1 parent 849a349 commit 10fedea
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 80 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"prettier": "^3.0.0",
"rollup": "2.36.0",
"rollup-plugin-typescript": "1.0.1",
"svelte": "^5.0.0-next.106",
"svelte": "file:../svelte/packages/svelte",
"ts-node": "^10.1.1",
"tslib": "^2.6.0",
"typescript": "5.1.3"
Expand Down
48 changes: 24 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
RegularElement,
SvelteElement,
} from './print/nodes';
import { extractAttributes } from './lib/extractAttributes';
import { base64ToString } from './base64-string';

const {
Expand Down Expand Up @@ -67,13 +66,6 @@ export function embed(path: AstPath, _options: Options) {
assignCommentsToNodes(node);
if (node.options) {
node.options.type = 'SvelteOptions';
node.options.attributes = extractAttributes(getText(node.options, options));
}
if (node.module) {
node.module.attributes = extractAttributes(getText(node.module, options));
}
if (node.instance) {
node.instance.attributes = extractAttributes(getText(node.instance, options));
}
if (node.css) {
node.css.content.type = 'StyleProgram';
Expand Down
47 changes: 0 additions & 47 deletions src/lib/extractAttributes.ts

This file was deleted.

0 comments on commit 10fedea

Please sign in to comment.