mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-05-30 15:42:25 +00:00
✨ Add style tag registry overrides
This commit is contained in:
@@ -11,6 +11,8 @@ version 0.4.0
|
||||
- feat: add inline style markup support in message text for ANSI text formatter output
|
||||
- feat: support named color tags like `<red>...</>`, style tags like `<b>...</>`, and hex tags like `<#ff0000>...</>` / `<bg:#010203>...</>`
|
||||
- feat: keep JSON formatter output unchanged and limit inline style parsing to text message rendering only
|
||||
- feat: add `TextStyle`, `StyleTagRegistry`, `style_tag_registry()`, and `default_style_tag_registry()` for reusable inline style tags
|
||||
- feat: add formatter-local `style_tags`, global style tag registry helpers, builtin-tag override support, and alias reuse via `define_alias(...)`
|
||||
|
||||
### Test
|
||||
|
||||
@@ -19,6 +21,7 @@ version 0.4.0
|
||||
- test: cover config parsing and serialization for `color_mode`
|
||||
- test: cover named inline color tags in ANSI mode
|
||||
- test: cover plain mode tag stripping, nested tags, hex tags, and unknown-tag fallback behavior
|
||||
- test: cover custom tags, builtin-tag override, formatter-vs-global priority, global registry fallback, and alias reuse
|
||||
|
||||
### Example
|
||||
|
||||
@@ -29,4 +32,4 @@ version 0.4.0
|
||||
- `Auto` currently uses a conservative rule: if `NO_COLOR` exists, ANSI is disabled; otherwise ANSI is enabled
|
||||
- inline style markup currently supports short close `</>` only
|
||||
- unknown or invalid inline tags currently fall back to plain text and do not raise formatter errors
|
||||
- tag registry override and configurable style aliases are planned for a later `0.4` batch
|
||||
- formatter-local tag lookup currently takes precedence over global tag lookup, and global lookup takes precedence over builtin tags
|
||||
|
||||
Reference in New Issue
Block a user