Skip to content

Commit d75ef1c

Browse files
committed
proper fix for tags that begin with <style
1 parent 398353f commit d75ef1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ Linter.prototype.verify = function(code, config, options) {
260260
const ignore_styles = get_setting_function(config, 'svelte3/ignore-styles', false);
261261
if (ignore_styles) {
262262
// wipe the appropriate <style> tags in the file
263-
code = code.replace(/<style\b([^]*?)>[^]*?<\/style>/gi, (match, attributes) => {
263+
code = code.replace(/<style(\s[^]*?)?>[^]*?<\/style>/gi, (match, attributes = '') => {
264264
const attrs = {};
265265
attributes.split(/\s+/).filter(Boolean).forEach(attr => {
266266
const [name, value] = attr.split('=');

0 commit comments

Comments
 (0)