Skip to content

Non-conforming HTML elements got us stuck #153

Answered by bglw
dprothero asked this question in Q&A
Discussion options

You must be logged in to vote

Unfortunately there is no current way around that — Pagefind parses HTML using the https://github.com/cloudflare/lol-html library, and that error there is a parsing error passed through directly from that library. Since the HTML document itself is failing to parse, it isn't possible for Pagefind to select down to a data-pagefind-body or anything.

Immediately after typing that I realized that lol-html can be initialized with strict: false to continue in the face of these parsing ambiguities. Since indexing pages for search isn't a security risk, I'll disable strict mode for Pagefind 🙌

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@bglw
Comment options

@bglw
Comment options

@dprothero
Comment options

Answer selected by dprothero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants