Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f1572a4

Browse files
Update packages/@tailwindcss-upgrade/src/codemods/template/is-safe-migration.ts
Co-authored-by: Jordan Pittman <[email protected]>
1 parent 2c1c31b commit f1572a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/@tailwindcss-upgrade/src/codemods/template/is-safe-migration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ const styleBlockRanges = new DefaultMap((source: string) => {
189189
let startTag = source.indexOf('<style', offset)
190190
if (startTag === -1) return ranges
191191

192+
offset = startTag + 1
193+
192194
// Ensure the style looks like:
193195
// - `<style>` (closed)
194196
// - `<style …>` (with attributes)
195-
if (!source[startTag + 6].match(/[>\s]/)) return ranges
196-
197-
offset = startTag + 1
197+
if (!source[startTag + 6].match(/[>\s]/)) continue
198198

199199
let endTag = source.indexOf('</style>', offset)
200200
if (endTag === -1) return ranges

0 commit comments

Comments
 (0)