zotero / citeproc-rs

CSL processor in Rust.
https://cormacrelf.github.io/citeproc-wasm-demo/
Other
75 stars 10 forks source link

Moving Punctuation #40

Closed cormacrelf closed 4 years ago

cormacrelf commented 4 years ago

The basic idea in this implementation is that strings assembled by the program stay separate until flattened into an HTML-/RTF-/etc-formatted string at the end. So you literally have to move characters from one string object to another. This is done in the final output phase.

Disambiguation flattens outputs locally, not across the entire output. Consequently, some punctuation that will eventually be simplified (e.g. two commas in a row) will at this stage not be simplified when comparing cites with refererences for disambiguation, so a stray comma may cause cites to be unambigous even though it doesn't appear in the final output.

cormacrelf commented 4 years ago

2 regressions due to more aggression with punctuation smashing in some cases (where space-separated). Their output will eventually be ignored by snapshot.

bugreports_DoubleEncodedAngleBraces.txt bugreports_AccidentalAllCaps.txt