Recheck the border after stored punctuation in a Regular's mention
A mention took in the name's trailing or leading punctuation without checking the border beyond it, so with Regulars "Beef Chili" and "Beef Chili!" the text "Beef Chili!X" named "Beef Chili!" alone, though the shared bare mention is ambiguous (MQ-100-6). Punctuation is now taken in only where the border still holds after it; otherwise the mention stays the bare name, and stays shared. Only punctuation and the spacing beside it may be left off a name's ends, and a combining mark counts as part of its letter, so a stored "Chicken Cafe" with a decomposed accent is no longer mentioned by "Chicken Cafe", nor plain "Chicken Cafe" by the accented spelling (MQ-100-7). Symbols are no longer trimmed either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -252,6 +252,11 @@ func TestSuggestSideQuestsReasonMentionRule(t *testing.T) {
|
||||
"punctuation-only difference": {[]string{"Beef Chili!"}, "Your Beef Chili! over corn chips.", "Beef Chili!", ""},
|
||||
"bare name inside punctuated": {[]string{"Beef Chili!"}, "Your Beef Chili! over corn chips.", "Beef Chili", none},
|
||||
"spelled alike by both": {[]string{"Beef Chili!"}, "Corn chips under your Beef Chili.", "Beef Chili", none},
|
||||
"punctuation then a letter": {[]string{"Beef Chili!"}, "Your Beef Chili!X is our inspiration.", "Beef Chili!", none},
|
||||
"letter before punctuation": {[]string{"¡Beef Chili"}, "Your X¡Beef Chili is our inspiration.", "¡Beef Chili", none},
|
||||
"stored symbol left off": {[]string{"Green Chili 🌶"}, "Like your Green Chili, gone green.", "Green Chili 🌶", none},
|
||||
"stored accent left off": {[]string{"Chicken Cafe\u0301"}, "Like your Chicken Cafe, gone green.", "Chicken Cafe\u0301", none},
|
||||
"accent written after name": {[]string{"Chicken Cafe"}, "Like your Chicken Cafe\u0301, gone green.", "Chicken Cafe", none},
|
||||
} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
in := household
|
||||
|
||||
Reference in New Issue
Block a user