feat: add content filter and code processing module (v0.3.0)

- Add content filter module (internal/content/)
- Implement basic character filtering (control chars, line breaks, symbols)
- Implement code block and inline code detection
- Implement comment detection for 30+ languages (JS/Python/Go/HTML/etc)
- Add go-enry dependency for intelligent language detection
- Add SkipKeywords config option (default: TODO/FIXME/HACK/XXX/etc)
- Integrate content processing into Translator
- Update config.yaml with skip_keywords
This commit is contained in:
2026-03-29 18:41:25 +08:00
parent 1bce2d9c7a
commit 6807371c5e
8 changed files with 625 additions and 8 deletions

2
go.mod
View File

@@ -4,6 +4,8 @@ go 1.26.1
require (
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
github.com/go-enry/go-enry/v2 v2.9.5 // indirect
github.com/go-enry/go-oniguruma v1.2.1 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect