(content)
| 27 | * @returns {boolean} True if content looks like legacy HTML |
| 28 | */ |
| 29 | export const isHtmlContent = (content) => { |
| 30 | if (!content || typeof content !== 'string') return false |
| 31 | return /^\s*<(?:p|div|h[1-6]|ul|ol|blockquote|pre|table)\b/i.test(content) |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Regex matching opening, closing, and self-closing XML/HTML tags. |
no test coverage detected