WordCensor: 3 censor modes (Grawlix / Replace / Alternative) and tidier UI#276
Merged
Conversation
…er UI The engine now takes a CensorOptions object with a Mode enum: - Grawlix (existing): mask the first ~50% of each match with random #@!?$%& characters. - Replacement: replace the whole match with a user-supplied string, default '[censored]'. The string is editable in the window. - Alternative: swap the match with another random entry from the bad-word list itself, with rough case-pattern preservation (FUCK → DAMN, Fuck → Damn, fuck → damn). Retries a few times to avoid picking the same word back. UI changes: - New 'How should offensive words be replaced?' card with the 3 modes as radio buttons; the replacement text box sits inline with its radio. - Highlight-in-red checkbox moved into the same card. - Window grew a bit (780x640) to fit the mode picker comfortably; section spacing tidied. Settings now persist mode + replacement + colorRed (was just colorRed). Old settings still load — only the missing fields fall back to defaults. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
CensorOptions { Mode, Replacement, ColorRed }object.#@!?$%&.[censored]).FUCK → DAMN,Fuck → Damn).mode + replacement + colorRed(was justcolorRed); older settings still load with sensible defaults for missing fields.Test plan
<font color="#ff0000">…</font>.🤖 Generated with Claude Code