forked from Muneerali199/Draftdeckai
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremove-div.mjs
More file actions
28 lines (22 loc) · 873 Bytes
/
remove-div.mjs
File metadata and controls
28 lines (22 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import fs from 'fs';
const filePath = './components/presentation/presentation-generator.tsx';
let content = fs.readFileSync(filePath, 'utf8');
console.log('🔧 Removing orphaned div tag...\n');
// Read line by line
const lines = content.split('\n');
const newLines = [];
for (let i = 0; i < lines.length; i++) {
// Skip line 1009 which has the orphaned div
if (lines[i].trim() === '<div className="space-y-2">') {
// Check if next line is UrlInputSection
if (i + 1 < lines.length && lines[i + 1].includes('UrlInputSection')) {
console.log(`✅ Skipping orphaned div at line ${i + 1}`);
continue; // Skip this line
}
}
newLines.push(lines[i]);
}
content = newLines.join('\n');
fs.writeFileSync(filePath, content, 'utf8');
console.log('✨ Fixed!\n');
console.log('Now RESTART your dev server and the URL feature will appear! 🎉\n');