langfield / ki

version control for Anki collections
https://langfield.github.io/ki/
GNU Affero General Public License v3.0
70 stars 3 forks source link

Libtidy throws exception in C code: `Assertion 'option_defs[ optId ].type == TidyBoolean' failed.` #122

Closed langfield closed 1 year ago

langfield commented 1 year ago

See below.

Writing deck
Writing deck
Making payload
Tidying:        The main course of this deck ("5000 Most Common French Words") is available for free in e-book form, via Amazon:<div><a href="https://www.amazon.com/dp/B015RW635Q">https://www.amazon.com/dp/B015RW635Q</a></div><div><br></div><div>If you like this deck, please rate it on Amazon (and write a review if you can). It helps me a lot, thanks!</div>
Ki-exe: /build/tidy-html5-93GQBN/tidy-html5-5.6.0/src/config.c:497: prvTidySetOptionBool: Assertion `option_defs[ optId ].type == TidyBoolean' failed.
Aborted

This is likely to be caused by one of these calls: https://github.com/langfield/ki/blob/b9a856a271c63e409d6c2abddea7c396c2e1c0d8/htidy.c#L20-L36

langfield commented 1 year ago

This has been fixed by actually reading the libtidy documentation, and finding a nice example on Github.