Skip to content

Conversation

@PyScriptPlus
Copy link

This PR modifies the color scheme of HunspellColorize to make
misspelled words appear in red in the terminal. Previously, the
program used ANSI bold sequences (\033[1m / \033[22m) which some
terminals do not display clearly.

Changes made:

  • Updated START and STOP macros:
    #define START "\033[31m"
    #define STOP "\033[0m"

This improves visibility of misspelled words and provides a clearer
visual cue for users reading text through the program.

The Hunspell functionality remains unchanged, and the program still
correctly identifies misspelled words using the same dictionaries.

Tested on WSL/Ubuntu with English dictionary (en_US.aff/en_US.dic).

No additional dependencies are required.

Suggested Usage:
echo "This is a simpel txt" | ./huncolor | less -R

Now, misspelled words like "simpel" and "txt" appear in red.

Copy link

@benny01000010 benny01000010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants