badges
badges copied to clipboard
[FR] Simple Syntax for Native Supported Types
[!NOTE] TL;DR: allow simple syntax for native supported badges (those defined in constants.ts) Example:
[!!SUCCESS]test case: given foo when bar then baz
Simplify Badge Syntax for Native Supported Types
Summary
Propose simplifying the badge syntax for natively supported badge types (as defined in constants.ts) by removing redundant key-value pairs.
Current Behavior
Currently, badges require a key-value syntax where both represent the same thing:
- `[!!success:SUCCESS]` test case: given foo when bar then baz
The key is case-insensitive, as demonstrated by these valid examples:
-
[!!success:SUCCESS] -
[!!SUCCESS:SUCCESS] -
[!!Success:SUCCESS]
Proposed Change
Allow a simplified syntax that uses a single value:
- `[!!SUCCESS]` test case: given foo when bar then baz
Benefits
- Cleaner, more concise syntax
- More readable when viewing raw markdown without the Badges plugin
- Maintains case-insensitive support (
[!!SUCCESS],[!!Success],[!!success]would all be valid)
The displayed text would use the case styling provided in the badge declaration.