bdarcus / csl-next

An experimental reimagining of CSL
Mozilla Public License 2.0
8 stars 0 forks source link

Disambiguate the `format` property #116

Closed bdarcus closed 1 year ago

bdarcus commented 1 year ago

Currently using this both to signal data-type specific formatting, and also child templates.

Should probably change the latter to "children".

Also, for type-safety (to limit confusing compiler errors), I'm not thrilled with this:

https://github.com/bdarcus/csl-next/blob/8b6f331fa0de2f86fac8b36f3b39a5571eb991f5/src/style.ts#L564

Make dedicated properties each; maybe:

bibliography:
  templates:
    - delimiter: space
      templates:
      - templateKey: author-apa-full
      - date: issued
        format: year
        wrap: parentheses
      - templateKey: title
      - templateKey: container-apa
      - templateKey: howpublished-apa