Repository navigation
Admit a reply whose option has no label: give unnamed-card advice on pages only - #6359
Merged
Merged
Conversation
…pages only unnamed_card_advice (#6325) ran inside instance_errors, which message admission shares with page check. Admission refuses on any finding, so a reply holding a compact <lf-option><strong>A</strong> ...</lf-option> with no label was rejected, though the registry allows it. The advice now runs from page check's _instance_errors beside pane_advice and inert_allocation_advice; page check reports it as before, and a message's admission and registry examples no longer see it. The docstring now says what the loop checks (a <strong> before any of the widget's own words, whatever elements come first) instead of how options were once written. Behavior change: a reply with an unlabelled option led by <strong> is admitted; test_a_reply_admits_an_option_that_leads_with_a_strong_and_no_label covers it.
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.
leaf thread replyrefused a reply holding a compact option with nolabel, such as<lf-option><strong>A</strong> first.</lf-option>, though the registry allows that shape; the refusal listed theunnamed-cardadvice as its reason.Cause:
unnamed_card_advice(#6325) marks its findings as advice but ran insideinstance_errors, which message admission shares withpage check(check_markup→message_markup_errors→fragment_errors→instance_errors). Admission refuses on any finding, and a message has no channel for advice, aspane_advicealready notes. Registry examples (composition._validate_example) went through the same path.Fix: the advice now runs from
validation/source.py:_instance_errors, besidepane_adviceandinert_allocation_advice, so only a page's documents get it.page checkreports it exactly as before. The docstring now says what the loop checks (a<strong>before any of the widget's own words, whatever elements come first) instead of how options were once written.Test:
test_a_reply_admits_an_option_that_leads_with_a_strong_and_no_labelrunscheck_markupon such a reply; it fails onmainwith theunnamed-cardrefusal and passes here.test_check_advises_a_label_where_a_card_leads_with_a_strongstill passes, so page check still gives the advice.