mirror of
https://github.com/Nanaloveyuki/BitLogger.git
synced 2026-05-30 15:42:25 +00:00
✨ Add configurable style markup modes
This commit is contained in:
@@ -14,6 +14,8 @@ version 0.4.0
|
||||
- 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(...)`
|
||||
- feat: support minimal `sink.text_formatter.style_tags` JSON config parsing and serialization for custom formatter tag styles
|
||||
- feat: add `StyleMarkupMode = Disabled | Builtin | Full` plus formatter helpers so callers can explicitly disable style parsing or allow builtin-only parsing
|
||||
- feat: support `sink.text_formatter.style_markup` in JSON config parsing and serialization
|
||||
|
||||
### Test
|
||||
|
||||
@@ -24,11 +26,13 @@ version 0.4.0
|
||||
- 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
|
||||
- test: cover formatter `style_tags` JSON parsing, config roundtrip, JSON helper export, and config-driven styled formatter rendering
|
||||
- test: cover disabled markup mode, builtin-only mode, and config-driven `style_markup` behavior
|
||||
|
||||
### Example
|
||||
|
||||
- docs: add `color_mode` usage examples to formatter documentation
|
||||
- docs: add runtime and JSON `style_tags` examples, and document current JSON schema scope
|
||||
- docs: add runtime and JSON examples for toggling style markup parsing
|
||||
|
||||
### Notes
|
||||
|
||||
@@ -37,3 +41,4 @@ version 0.4.0
|
||||
- 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
|
||||
- users can now decide whether custom style parsing is enabled through runtime formatter APIs or `sink.text_formatter.style_markup`
|
||||
|
||||
Reference in New Issue
Block a user