feat: add swoogo classes to force include main tags

This commit is contained in:
Gergő Móricz
2025-04-03 09:57:16 +02:00
parent 24f5199359
commit 2e2c3d52ce
2 changed files with 31 additions and 3 deletions
@@ -197,8 +197,22 @@ const EXCLUDE_NON_MAIN_TAGS: [&str; 41] = [
"#cookie", "#cookie",
]; ];
const FORCE_INCLUDE_MAIN_TAGS: [&str; 1] = [ const FORCE_INCLUDE_MAIN_TAGS: [&str; 13] = [
"#main" "#main",
// swoogo event software as .widget in all of their content
".swoogo-cols",
".swoogo-text",
".swoogo-table-div",
".swoogo-space",
".swoogo-alert",
".swoogo-sponsors",
".swoogo-title",
".swoogo-tabs",
".swoogo-logo",
".swoogo-image",
".swoogo-button",
".swoogo-agenda",
]; ];
#[derive(Deserialize)] #[derive(Deserialize)]
@@ -49,7 +49,21 @@ const excludeNonMainTags = [
"#cookie", "#cookie",
]; ];
const forceIncludeMainTags = ["#main"]; const forceIncludeMainTags = [
"#main",
".swoogo-cols",
".swoogo-text",
".swoogo-table-div",
".swoogo-space",
".swoogo-alert",
".swoogo-sponsors",
".swoogo-title",
".swoogo-tabs",
".swoogo-logo",
".swoogo-image",
".swoogo-button",
".swoogo-agenda"
];
export const htmlTransform = async ( export const htmlTransform = async (
html: string, html: string,