fix: raise citation markers and stop adjacent ones merging #22

Merged
adrianbonpin merged 1 commits from feat/superscript-citations into prod 2026-10-07 08:20:03 +00:00
Owner

Raises the citation marker and stops adjacent ones from merging. Both came from looking at a real answer.

The marker is raised. [1] is now drawn as a superscript link, which is what a citation mark is. It is a Unicode digit rather than a <sup> tag: a link label is plain text that no pass can break, while inline HTML in a label asks the sanitizer, the parser and Qt to agree about something this repository cannot test. The entry under the answer keeps the plain number at baseline, [1] Rain in Cebu, where scanning a list matters more than the convention.

Adjacent markers no longer merge. The prompt asks for [1][2] when a sentence rests on two sources, and raised digits carry no separator of their own, so the pair was drawn as a single run of digits: one number, with nothing to say where the first citation stopped and the second began. That was visible in a real answer, where two sources came out as one glom.

Markers are now matched as a run, so [1][2] and [1, 2] both arrive as raised digits separated by a comma, and a run containing a number we were never shown is left exactly as written. A newline still ends a run, so two lines of citations never become one sentence.

631 tests, 4 new on the run rule. Mutation checked: removing the separator fails three tests.

Raises the citation marker and stops adjacent ones from merging. Both came from looking at a real answer. **The marker is raised.** `[1]` is now drawn as a superscript link, which is what a citation mark is. It is a Unicode digit rather than a `<sup>` tag: a link label is plain text that no pass can break, while inline HTML in a label asks the sanitizer, the parser and Qt to agree about something this repository cannot test. The entry under the answer keeps the plain number at baseline, `[1] Rain in Cebu`, where scanning a list matters more than the convention. **Adjacent markers no longer merge.** The prompt asks for `[1][2]` when a sentence rests on two sources, and raised digits carry no separator of their own, so the pair was drawn as a single run of digits: one number, with nothing to say where the first citation stopped and the second began. That was visible in a real answer, where two sources came out as one glom. Markers are now matched as a run, so `[1][2]` and `[1, 2]` both arrive as raised digits separated by a comma, and a run containing a number we were never shown is left exactly as written. A newline still ends a run, so two lines of citations never become one sentence. 631 tests, 4 new on the run rule. Mutation checked: removing the separator fails three tests.
adrianbonpin added 1 commit 2026-10-07 08:19:56 +00:00
The prompt asks for [1][2] when a sentence rests on two sources, and raised
digits carry no separator of their own, so the pair was drawn as 12: one
number, with nothing to say where the first citation stopped and the second
began. Reported from a real answer, where two sources came out as one glom.

Markers are now matched as a run, so [1][2] and [1, 2] both arrive as raised
digits separated by a comma, and a run containing a number we were never shown
is left exactly as written. A newline still ends a run, so two lines of
citations never become one sentence.

The marker itself is raised too: [1] is drawn as a superscript link, which is
what a citation mark is, while the entry under the answer keeps the plain
number at baseline where a list is easier to scan.
adrianbonpin merged commit 0705d5ec2f into prod 2026-10-07 08:20:03 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adrianbonpin/lam-agent-vicinae#22