atk4 / ui

Robust and easy to use PHP Framework for Web Apps
https://atk4-ui.readthedocs.io
MIT License
443 stars 106 forks source link

Fomantic-UI multiword class (class with space) should be supported natively #1996

Open mvorisek opened 1 year ago

mvorisek commented 1 year ago

The following public/external/postinstall.js code can parse all relevant multiword classes:

// assert classes with space data in Atk4\Ui\Xxx are up to date
const classesWithSpace = new Set();
walkFilesSync(path.join(__dirname, 'fomantic-ui'), (f) => {
    if (!f.endsWith('.css')) {
        return;
    }

    const data = fs.readFileSync(f, 'binary');
    for (const m of data.match(/(?<=class\*=")([^"]+ [^"]+)(?=")/g)) {
        classesWithSpace.add(m);
    }
});

marking as feature request as the support was never added.