Fix empty cloze words and preserve trailing punctuation#3
Open
derspotter wants to merge 1 commit intobenmanone:masterfrom
Open
Fix empty cloze words and preserve trailing punctuation#3derspotter wants to merge 1 commit intobenmanone:masterfrom
derspotter wants to merge 1 commit intobenmanone:masterfrom
Conversation
7a7fe9c to
3423959
Compare
Two bugs fixed:
1. Empty cloze words: French typography puts spaces before punctuation
marks (e.g., "C'est vrai ?"). This causes split_inclusive(' ') to
create a standalone "?" word. When randomly selected, remove_punctuation
returns "", resulting in no underscores and empty input matching as
"Correct". Fixed by filtering out words that become empty after
punctuation removal.
2. Lost punctuation: Words like "moment." had their punctuation stripped
entirely since it was part of the selected word but removed for answer
matching. Now we store the raw word and extract trailing punctuation
separately for display while still ignoring it for answer comparison.
Also removes non-existent minicloze-gui from workspace members.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3423959 to
f56a2ca
Compare
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.
Summary
C'est vrai ?) could result in empty cloze wordsminicloze-guifrom workspace membersProblem
Bug 1: Empty cloze words
French typography puts spaces before
?,!,:,;. This causessplit_inclusive(' ')to create standalone punctuation "words". When randomly selected,remove_punctuation("?")returns"", resulting in:Bug 2: Lost punctuation
Words like
moment.had their punctuation stripped entirely. The period was part of the selected word but removed for answer matching, and never appeared insecond_half.Solution
remove_punctuationbefore random selectionTest plan
minicloze french- sentences now always show proper blanks🤖 Generated with Claude Code