Commits


parsers: add serialize function Add a parser_serialize function and an optional function `serialize' for parsers. The default implementation just prints the text line, which is suitable for parser_textplain and parser_textpatch; gemtext and gophermap uses their own specific unparse functions. This is intended for an incoming cache refactoring: we'll cache the page serialized in the correct format, not once it has been translated to gemtext. This will allow in the future to provide commands such as ``save page to disk'' or interface with an on-disk cache.


fix parsing of invalid link lines Links lines without an URL may crash Telescope if the emojify-link option is enabled (which is by default.) Since URLs are mandatory in link lines, parse these invalid lines as empty text lines (lagrange and phos parses them as text lines with "=>".) thanks @aartaka for unknowingly helping finding this issue, see https://github.com/omar-polo/phos/pull/5


fix item line detection cherry-pick of commit ff79bf032c776716f71996eda953fe7b6ef8008b from the (abandoned?) branch feature/cache. The spec says (5.5.2 Unordered list items) > Lines beginning with "* " are unordered list items. (regarding the feature/cache branch, I think I want to drop that and start afresh, here's why the cherrypick and not a merge or a rebase)


replace TAILQ_EMPTY/INSERT_HEAD/TAIL dance with a single TAILQ_INSERT_TAIL Now that all the queues are correctly initialised, there's no need for that dance.


initialize all the queues


rename textplain/gemtext.c to parser_*