0b1c2c2404
`$()` only treats the input as HTML when it starts with `<`; otherwise it
parses as a CSS selector. The novelbuddy API returns `initialManga.summary`
as plain text for many novels (e.g. "When I opened my eyes, I was inside
a novel."), and cheerio's selector parser then chokes on the first `.`
in the punctuation with `Expected name, found .` — `parseNovel` throws
and the novel page fails to load entirely.
Wrap the summary in a `<div>` before passing it to `$()` so cheerio always
takes the HTML branch. Plain text becomes `<div>plain text</div>` (parses
fine, `.text()` still returns the original string), HTML stays HTML, and
the existing `.find('br').replaceWith('\n')` / `.find('p').before/after`
behavior is preserved either way.
Bumps version 2.1.0 → 2.1.1.
Repro:
- Open the source, search/browse to "Trash of the Count's Family" (or any
novel where the API returns a plain-text summary)
- Tap the entry; details fail with `QuickJsException: Expected name, found .`