-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatch-css-wrapper.js
More file actions
18 lines (15 loc) · 963 Bytes
/
Copy pathpatch-css-wrapper.js
File metadata and controls
18 lines (15 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const fs = require('fs');
let file = 'c:/Users/admin/Dropbox/Apps/remotely-save/Croptop/.obsidian/plugins/proxima/src/ui/views/components/ProjectTaskBoard.svelte';
let content = fs.readFileSync(file, 'utf8');
// Replace the buggy outer containers with the correct CSS class
content = content.replace(
/<div class="pos-board-scroll-container">\s*<div class="pos-board-container" use:dndzone=\{\{items: boardColumns, flipDurationMs, type: 'columns'\}\} on:consider=\{handleColumnConsider\} on:finalize=\{handleColumnFinalize\}>/,
`<div class="pos-board-workspace" use:dndzone={{items: boardColumns, flipDurationMs, type: 'columns'}} on:consider={handleColumnConsider} on:finalize={handleColumnFinalize}>`
);
// Close tag fix
content = content.replace(
/ <\/div>\n <\/div>\n<\/div>/,
` </div>\n </div>` // removing one closing div since we merged two wrappers into one
);
fs.writeFileSync(file, content);
console.log('Patched outer CSS wrapper');