-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Quality Control
We love the CSL style repository, and try keep it in tip-top shape. Since we have thousands of styles and hundreds of contributors, we rely heavily on automated quality control and periodic maintenance. This page describes our best practices.
preferably fork, branch, and create pull requests
godsend, checks repo and all incoming pull requests
csl-repository.rnc
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.
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
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