diff --git a/scripts/minify-icon-font.ts b/scripts/minify-icon-font.ts index b1adcc4b..bce8e4d9 100644 --- a/scripts/minify-icon-font.ts +++ b/scripts/minify-icon-font.ts @@ -1,16 +1,16 @@ /* * Copyright (C) 2022 StApps - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation, version 3. + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, version 3. * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ /* eslint-disable @typescript-eslint/no-non-null-assertion */ @@ -56,6 +56,7 @@ async function minifyIconFont() { } } + console.log('Icons used:', [...icons.values()].sort()); const font = fontkit.openSync(config.inputPath); const glyphs: string[] = ['5f-7a', '30-39']; diff --git a/src/app/modules/settings/item/settings-item.html b/src/app/modules/settings/item/settings-item.html index e5b75d77..d0827587 100644 --- a/src/app/modules/settings/item/settings-item.html +++ b/src/app/modules/settings/item/settings-item.html @@ -1,3 +1,18 @@ + + diff --git a/src/app/util/ion-icon/icon-match.spec.ts b/src/app/util/ion-icon/icon-match.spec.ts index 27309a40..75f6f1d2 100644 --- a/src/app/util/ion-icon/icon-match.spec.ts +++ b/src/app/util/ion-icon/icon-match.spec.ts @@ -1,16 +1,16 @@ /* * Copyright (C) 2022 StApps - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation, version 3. + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, version 3. * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ /* eslint-disable unicorn/no-null */ @@ -32,6 +32,18 @@ describe('matchTagProperties', function () { it('should not match wrong tags', function () { expect(''.match(regex)).toEqual(null); }); + + it('should accept valid html whitespaces', function () { + expect( + ` + + + `.match(regex), + ).toEqual(['\n content\n ']); + }); }); describe('matchPropertyContent', function () { diff --git a/src/app/util/ion-icon/icon-match.ts b/src/app/util/ion-icon/icon-match.ts index c6dbb858..e30be18e 100644 --- a/src/app/util/ion-icon/icon-match.ts +++ b/src/app/util/ion-icon/icon-match.ts @@ -1,23 +1,23 @@ /* * Copyright (C) 2022 StApps - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation, version 3. + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation, version 3. * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . */ /** * */ export function matchTagProperties(tag: string) { - return new RegExp(`(?<=<${tag})[\\s\\S]*?(?=><\\/${tag}>)`, 'g'); + return new RegExp(`(?<=<${tag})[\\s\\S]*?(?=>\\s*<\\/${tag}\\s*>)`, 'g'); } /** diff --git a/src/assets/icons.min.woff2 b/src/assets/icons.min.woff2 index 79b71fed..a7004292 100644 Binary files a/src/assets/icons.min.woff2 and b/src/assets/icons.min.woff2 differ