Skip to content

Commit 09c48c0

Browse files
committed
🐛 solve close input script reg
1 parent 9c8c647 commit 09c48c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

command/selfCloseInputTag.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const main = codePath => {
2424

2525
const matchAndReplace = path => {
2626
const pageContent = fs.readFileSync(path, 'UTF-8')
27-
const newContent = pageContent.replace(/(<[\s\S]*?input\b[^/]*?)>[\s\S]*?<\/input>/gm, '$1 />')
27+
const newContent = pageContent.replace(/(<)([\s]*?)(input\b[^\/]*?)>[\s\S]*?<\/input>/gm, '$1$3 />')
2828
fs.writeFile(path, newContent, error => {
2929
if (error) throw `Something went wrong: ${error}`
3030
})

0 commit comments

Comments
 (0)