mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-05-30 15:42:25 +00:00
✨ Support named style closing tags
This commit is contained in:
@@ -18,6 +18,7 @@ version 0.4.0
|
||||
- feat: support `sink.text_formatter.style_markup` in JSON config parsing and serialization
|
||||
- feat: add builtin semantic style tags such as `accent`, `info`, `success`, `warning`, `danger`, and `muted`
|
||||
- feat: add independent `target_style_markup` and `fields_style_markup` controls for `TextFormatter` and `TextFormatterConfig`
|
||||
- feat: support named closing tags like `</red>` alongside the existing short close `</>`
|
||||
|
||||
### Test
|
||||
|
||||
@@ -31,6 +32,7 @@ version 0.4.0
|
||||
- test: cover disabled markup mode, builtin-only mode, and config-driven `style_markup` behavior
|
||||
- test: cover builtin semantic tag rendering and confirm user overrides still take precedence
|
||||
- test: cover target and field markup rendering, plus config roundtrip for the new formatter markup scopes
|
||||
- test: cover named closing tags, mixed short/named closing, and unmatched named-close fallback behavior
|
||||
|
||||
### Example
|
||||
|
||||
@@ -41,7 +43,7 @@ version 0.4.0
|
||||
### Notes
|
||||
|
||||
- `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
|
||||
- inline style markup supports both short close `</>` and named closing tags like `</red>`
|
||||
- unknown or invalid inline tags currently fall back to plain text and do not raise formatter errors
|
||||
- formatter-local tag lookup currently takes precedence over global tag lookup, and global lookup takes precedence over builtin tags
|
||||
- JSON config currently supports concrete style objects only; alias-style declarations remain runtime-only
|
||||
|
||||
Reference in New Issue
Block a user