spencermountain / wtf_wikipedia

a pretty-committed wikipedia markup parser
https://observablehq.com/@spencermountain/wtf_wikipedia
MIT License
778 stars 129 forks source link

Handling embedded start date/end date templates in infoboxes? #519

Closed tmtmtmtm closed 1 year ago

tmtmtmtm commented 1 year ago

A common pattern in Infobox Officeholder is to have a level of indirection in dates, such as

|term_start   = {{start date|2022|May|6}}
|term_end     = {{end date|2023|January|11}}

(this one is from https://en.wikipedia.org/wiki/Eric_Mattson)

Currently the full dates end up in the templates section, but the infobox only gets the year:

          "term_start": {
            "text": "2022",
            "number": 2022
          },
          "term_end": {
            "text": "2023",
            "number": 2023
          },

It would be good if the full dates could appear here. Or perhaps there's some way to join these up similar to the approach in #516?

spencermountain commented 1 year ago

good catch. got a fix for this on dev branch

spencermountain commented 1 year ago

released in 10.1.3 cheers