| 5666 | "html" |
| 5667 | ]); |
| 5668 | const isQuirky = ( |
| 5669 | /** @type {string} */ name, |
| 5670 | /** @type {string | null} */ pub, |
| 5671 | /** @type {string | null} */ sys |
| 5672 | ) => { |
| 5673 | if (name !== "html") return true; |
| 5674 | const p = pub ? pub.toLowerCase() : null; |
| 5675 | const sl = sys ? sys.toLowerCase() : null; |
| 5676 | if (p !== null) { |
| 5677 | if (QUIRKY_EXACT.has(p)) return true; |
| 5678 | for (const pre of QUIRKY_PREFIXES) if (p.startsWith(pre)) return true; |
| 5679 | if ( |
| 5680 | sl === null && |
| 5681 | (p.startsWith("-//w3c//dtd html 4.01 frameset//") || |
| 5682 | p.startsWith("-//w3c//dtd html 4.01 transitional//")) |
| 5683 | ) { |
| 5684 | return true; |
| 5685 | } |
| 5686 | } |
| 5687 | if (sl === "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd") { |
| 5688 | return true; |
| 5689 | } |
| 5690 | return false; |
| 5691 | }; |
| 5692 | |
| 5693 | modes.initial = (t) => { |
| 5694 | if (t.type === TOKEN_CHAR) { |