Version 1.0.47 release

Fix a duplicate space issue.

General refactoring of code for identifying an quashing
duplicate punctuation and spaces. The code should be
easier to control when further issues involving punctuation
arise down the road.

Could you provide any guidelines for quashing duplicate punctuation and
spaces that we could add to the spec?

I can describe what the citeproc-js processor does at the moment,
although I’m pretty sure it’s going to require extension and
adjustment in light of further experience. Here are the rules used (I
hope) in 1.0.47:

  • The processor does not touch user data.
  • The processor renders term variables in the exact form required by
    the term content and the value of the strip-periods attribute, if any.
  • If there is terminal punctuation at the end of a content string,
    terminal punctuation that immediately follows in a suffix, delimiter,
    or prefix of a subsequent element is suppressed. Note, however, that:
    – Intervening formatting decorations (including any quotation marks
    provided by the style via the quotes=“true” attribute) are ignored;
    and
    – Closing braces – “)” or “]” – are not ignored; if a period occurs
    on both sides of a closing parens, for example, both will always be
    rendered.
  • All duplicate punctuation and duplicate spaces resulting from the
    composition of prefixes, suffixes and delimiters supplied by the style
    is reduced to a single character.

Although it verges on an implementation detail, it’s worth mentioning
that suppression, when it occurs, only affects one character in the
CSL attribute subjected to suppression. A prefix beginning with two
periods will render a second period in the output, for example.

There are probably wrinkles in this that will need to be ironed out
down the road. Terminal punctuation for various languages should be
covered. There may also be some cases and combinations for which the
current rules produce visually unpleasant results. Not sure.

(Cross-posting to xbiblio-devel for discussion.)

Frank