You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix emoji substitution in Rich output and add coordinate formatting
Rich's emoji feature was converting patterns like `:fiji:` in Maven
coordinates to flag emojis (🇫🇯). This affected logging and console
output, making coordinates difficult to read and breaking text parsing.
Changes:
- Set RichHandler markup=False to disable emoji/markup in log messages
- Add Coordinate.rich() method for styled coordinate formatting
- Update coord2str() with rich parameter for semantic coloring
- groupId: bold cyan, artifactId: bold, version: green
- Colons: dim (prevents emoji substitution as side effect)
- Update search.py and versions.py to use Coordinate.rich()
- Add tests in color.t verifying emoji prevention with :bear: pattern
- Update docs/output-subsystem.md with markup behavior explanation
The dim colons in rich formatting break emoji patterns (e.g., `:bear:`
becomes `[dim]:[/]bear[dim]:[/]` which Rich doesn't recognize as 🐻).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
- Module:line formatting when verbose >= 2 (`show_path=True`)
193
+
- Rich tracebacks for better exception formatting
194
+
- Nice layout and styling
195
+
196
+
**❌ What is NOT enabled** (markup processing in message content):
197
+
- Rich markup tags like `[red]text[/]`, `[bold]text[/]` - will be shown literally
198
+
- Emoji substitution like `:emoji_name:` (e.g., `:fire:`, `:fiji:`) - will be shown literally
199
+
200
+
**Rationale:**
201
+
1.**Prevents collisions with user data**: Maven coordinates like `sc.fiji:fiji:2.17.0` contain the pattern `:fiji:` which Rich would interpret as the Fiji flag emoji 🇫🇯 if markup were enabled
202
+
2.**Keeps logs simple**: Log messages should be plain text for debugging and grepping
203
+
3.**No need for markup in logs**: RichHandler already provides sufficient styling via log levels
**Note:** If you need to include text with literal square brackets (e.g., `[settings]` section names) in console output, use `rich.markup.escape()` to prevent misinterpretation as markup tags.
224
+
186
225
**`get_log(name="jgo") -> logging.Logger`**
187
226
- Get a logger instance for a module
188
227
- All module loggers should be children of "jgo" root logger
@@ -444,6 +483,7 @@ After refactoring and testing, here's the **verified clean output approach**:
444
483
- ✅ Warnings about potential issues
445
484
- ✅ Errors with context
446
485
- ✅ Debug information
486
+
- ⚠️ **Note**: Log messages do NOT support Rich markup (see [Rich Markup in Log Messages](#rich-markup-in-log-messages))
0 commit comments