/** * RSS content type detection for PodTUI * * Determines whether RSS feed content (description, etc.) is HTML or plain * text so the appropriate parsing path can be selected. */ export enum ContentType { HTML = "html", PLAIN_TEXT = "plain_text", UNKNOWN = "unknown", } /** Common HTML tags found in RSS descriptions */ const HTML_TAG_RE = /<\s*\/?\s*(div|p|br|a|b|i|em|strong|ul|ol|li|span|h[1-6]|img|table|tr|td|blockquote|pre|code|hr)\b[^>]*\/?>/i /** HTML entity patterns beyond the basic five (& etc.) */ const HTML_ENTITY_RE = /&(nbsp|mdash|ndash|hellip|laquo|raquo|ldquo|rdquo|lsquo|rsquo|bull|#\d{2,5}|#x[0-9a-fA-F]{2,4});/ /** CDATA wrapper — content inside is almost always HTML */ const CDATA_RE = /^\s*