Skip to content

Quality Control

Philipp Zumstein edited this page Jan 22, 2015 · 14 revisions

Here we keep track of problematic CSL code patterns we have observed in the wild, and provide information on how they can be detected and corrected.

Spaces if second field is flushed

If the second field in the bibliography is flushed, then it should not have a space as a prefix.

Search patterns

<bibliography[^>]*second-field-align="flush"[^>]*>.*<layout[^>]*>\r\n\s*<text variable="citation-number"[^>]*/>\r\n\s*<text[^>]*prefix=" "

Fix

Delete prefix=" " by hand, but it seems possible to automatically delete the last prefix attribute in this pattern. No, critical case found. Moreover, no case with a different prefix beginning with a space found.

History

2015-01: #1349 and #1346 : ca. 39 matches

Adjacent spaces from suffix and prefix

Search Pattern

<[^/>]*suffix="[^"/>]* "[^/>]*/?>\s*\r\n\s*<[^/>]*prefix=" [^"/>]*"[^/>]*/?>

Fix

Manually look at every case and either (i) delete the space in suffix, (ii) delete the space in the prefix, (iii) use a group with delimiter=" ", or (iv) rewritte some parts of the style. This can take some time in order to not change the punctation. It may be possible to restrict the search pattern more, in order to obtain smaller sets of the same/similar replacements.

History

2015-01: #1301 : ca. 300 hits in 230 files

Clone this wiki locally