We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c8c647 commit 09c48c0Copy full SHA for 09c48c0
command/selfCloseInputTag.js
@@ -24,7 +24,7 @@ const main = codePath => {
24
25
const matchAndReplace = path => {
26
const pageContent = fs.readFileSync(path, 'UTF-8')
27
- const newContent = pageContent.replace(/(<[\s\S]*?input\b[^/]*?)>[\s\S]*?<\/input>/gm, '$1 />')
+ const newContent = pageContent.replace(/(<)([\s]*?)(input\b[^\/]*?)>[\s\S]*?<\/input>/gm, '$1$3 />')
28
fs.writeFile(path, newContent, error => {
29
if (error) throw `Something went wrong: ${error}`
30
})
0 commit comments