const fs = require('fs')
let content = fs.readFileSync('lib/remark-copy-images.ts', 'utf8')
const lines = content.split('\n')
for (let i = 0; i < lines.length; i++) {
  if (lines[i].includes('replace')) {
    console.log(`Line ${i + 1}:`, JSON.stringify(lines[i]))
    lines[i] = lines[i].replace(/replace\(\/\\/g / g, 'replace(/\\/g')
    console.log(`Fixed:`, JSON.stringify(lines[i]))
  }
}
fs.writeFileSync('lib/remark-copy-images.ts', lines.join('\n'))
