Repository navigation
Allow receipted caption changes - #189
Merged
Merged
Conversation
A figure was compared as a whole, so a reworded caption failed even with a receipt. That blocks wording proposals whose only finding is a caption. A caption's content may now change when the receipt lists the figure in changed_figure_captions, the same way alt text works. Inside the caption the rules for article text apply: only the markup an edit may use, and invisible characters only as listed. The figure's ID and structure, the link that opens it, its images and the caption element stay locked, listed or not. An unlisted caption change fails, and listing an unchanged caption fails. Without a receipt a caption change awaits one that names the figure, and the drafted receipts and record-accepted-edit.mjs fill the field.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A figure's caption can now be reworded when the receipt lists the figure in
changed_figure_captions, the same way alt text works withchanged_image_alt_text.Why: since #188, figures are compared as a whole, so a reworded caption failed even with a receipt. That blocks #146 (Reputation) and #147 (Reputation2), whose only finding is a reworded caption.
Still locked, listed or not: the figure's ID and structure, the link that opens it, its images (everything but the alt text under
changed_image_alt_text), and the caption element itself. Inside a listed caption, the rules for article text apply: only the inline markup a wording edit may use, and invisible characters only when listed. An unlisted caption change fails, and so does listing a caption that did not change.Awaiting a receipt: a caption change counts as awaiting, and the
receiptssummary names the figure. The drafted receipts andscripts/record-accepted-edit.mjsfill in the new field.Tests (in
scripts/accepted-edits.test.mjs):npm test(166 tests) and the strictnpm run buildpass. With #146's and #147's edits converted to Markdown, each is awaiting a receipt, and only its own figure is named:source-image-4andsource-image-1, for alt text and caption.