Repository navigation
Let annotations set titles in italics - #323
Conversation
An annotation was plain text, so a title named in a note printed in
roman. The Annotation field now stores *Title* as <i>Title</i>
(CSL-JSON's rich-text italics) and shows it back as *Title*. The
sanitizers keep <i>/<em> runs around plain text on one line and strip
everything else; save(), the editor list, and the PHP port print the
runs as <i>. RIS drops the tags; BibTeX writes \textit{}, which
imports back as <i>. A new annotations-italics save-parity fixture
pins JS and PHP. No stored annotation held <i> before, so saved
blocks are unchanged and need no deprecation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WPtgA3mvvkn8io7SnJ1CxT
Plugin readme previewOpen preview · Commit 37 passed · 0 warnings · 0 notes Passed checks (37)
Readme and PHP-header checks only; this does not test plugin runtime compatibility. |
…ion-italics # Conflicts: # SPEC.md # docs/current-metrics.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WPtgA3mvvkn8io7SnJ1CxT
Codecov Report❌ Patch coverage is Additional details and impacted files☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Requested by Dan · project thread
Why
Annotations were plain text, so a title named in a note ("builds on The Human Condition") printed in roman, against every style's rule that titles are italic. This blocks moving hand-built annotated lists (Distant Early's "Recommended" section) into Borges without losing italics.
What
annotekeeps<i>…</i>around plain text on one line (CSL-JSON's rich-text italics;<em>is stored as<i>). Everything else is still stripped. JSnormalizeAnnotationText()and PHPbibliography_builder_normalize_annotation_text()mirror each other, using private-use markers (U+E004/U+E005) while stripping, the same way nocase spans are kept.<i>Title</i>as*Title*and stores*Title*back as<i>(field editor and manual entry). An asterisk next to a space, letter, or digit (* * *,2*3*4) stays as typed. Help text says so.save(), the editor list, and the PHP port print the runs as<i>and escape the rest (getAnnotationSegments()/bibliography_builder_save_annotation_html()), so a stray<i>or<here>shows as text.N1drops the tags; CSL-JSON keeps<i>; BibTeX/BibLaTeX write\textit{}(citation-js), which imports back as<i>.<i>before (the sanitizer stripped it), so saved blocks render identically. Newannotations-italicssave-parity fixture pins JS and PHP.Testing
npx jest(full): 1714 passedcomposer test:php: 893 passed, incl. new sanitizer/render tests and the parity fixturenpm run lint:js(one pre-existing warning),format:check,typecheck:js,lint:php,verify-metrics.sh: passPairs with #322 (annotation styling). Whichever merges second needs
docs/current-metrics.mdre-derived.Generated by Claude Code