Ticket Hash: | 8ad560204f7a5c94691355d4572fa2dca544d849 | |||
Title: | Refactor listing/query functions | |||
Status: | Closed | Type: | Aesthetic Improvement | |
Severity: | Minor | Priority: | Immediate | |
Subsystem: | Resolution: | Open | ||
Last Modified: | 2020-02-20 04:30:35 | |||
Version Found In: | ||||
User Comments: | ||||
joel added on 2020-02-14 21:49:08:
(text/x-markdown)
Currently there are three functions `<listing-short>`, `<listing-full>` and `<listing-excerpt>` and you pass them the query-generating function itself (`articles` or `articles+notes`), rather than passing an expression _using_ those functions which produces the query. The only reason we need three separate functions is the different treatment needed for `<listing-short>`. The markup stored in the listing_short column is contained in an `<li>`, so `<listing-short>` needs to return the concatenated HTML wrapped in a `<ul>` tag. If the markup were changed so that no such special treatment were needed, we could switch to a single listing function, with usage like this: ```racket ◊(collate (articles+notes 'short)) ``` joel added on 2020-02-20 04:30:35: (text/x-markdown) Finished in [](3be7a3ababaccdb3) |