You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/compiler/parse/read/style.js

20 lines
364 B

export default function readStyle ( parser, start, attributes ) {
const contentStart = parser.index;
const styles = parser.readUntil( /<\/style>/ );
const contentEnd = parser.index;
parser.eat( '</style>', true );
const end = parser.index;
return {
start,
end,
attributes,
content: {
start: contentStart,
end: contentEnd,
styles
}
};
}