tsackton / taelgar

0 stars 0 forks source link

Update partOf formatting to follow the pattern of whereabouts and oth… #26

Closed msackton closed 9 months ago

msackton commented 9 months ago

This introduces proper support for part of chains. A partOf chain, for now, is defined as a set of pages linked via partOf that are all of the same type. The chain (for now) just returns the name of each element in the chain, although in the future it could return the entire page metadata to allow for more complexity (i.e. format strings, link text, etc)

TokenParser is then updated to support using the part of chain, plus the partof-list formatter, to format the list. This is similar to have whereabouts and affiliations work.

Secondarily, the common code for formatting a list is abstracted into a generic format list function, and the different list formatters all call it.