Refactor listing/query functions
|User & Date:||joel on 2020-02-14 21:49:08|
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)) ```
- login: "joel"
- mimetype: "text/x-markdown"
- severity changed to: "Minor"
- status changed to: "Open"
- title changed to: "Refactor listing/query functions"
- type changed to: "Aesthetic Improvement"