|
| 1 | +--- |
| 2 | +id: MDS045 |
| 3 | +name: list-marker-style |
| 4 | +status: ready |
| 5 | +description: Unordered list items must use the configured bullet marker character. |
| 6 | +--- |
| 7 | +# MDS045: list-marker-style |
| 8 | + |
| 9 | +Unordered list items must use the configured bullet marker character. |
| 10 | + |
| 11 | +## Settings |
| 12 | + |
| 13 | +| Setting | Type | Default | Description | |
| 14 | +|----------|--------------|----------|-----------------------------------------------------------| |
| 15 | +| `style` | string | `"dash"` | `"dash"` (`-`), `"asterisk"` (`*`), or `"plus"` (`+`) | |
| 16 | +| `nested` | list(string) | `[]` | Per-depth style rotation; cycles by `depth % len(nested)` | |
| 17 | + |
| 18 | +## Config |
| 19 | + |
| 20 | +Enable with dash style (the default when enabled): |
| 21 | + |
| 22 | +```yaml |
| 23 | +rules: |
| 24 | + list-marker-style: |
| 25 | + style: dash |
| 26 | +``` |
| 27 | +
|
| 28 | +Disable (default): |
| 29 | +
|
| 30 | +```yaml |
| 31 | +rules: |
| 32 | + list-marker-style: false |
| 33 | +``` |
| 34 | +
|
| 35 | +Depth-based rotation (outer uses `-`, inner uses `*`): |
| 36 | + |
| 37 | +```yaml |
| 38 | +rules: |
| 39 | + list-marker-style: |
| 40 | + nested: |
| 41 | + - dash |
| 42 | + - asterisk |
| 43 | +``` |
| 44 | + |
| 45 | +## Examples |
| 46 | + |
| 47 | +### Good -- dash style |
| 48 | + |
| 49 | +<?include |
| 50 | +file: good/dash.md |
| 51 | +wrap: markdown |
| 52 | +?> |
| 53 | + |
| 54 | +```markdown |
| 55 | +# Good dash marker |
| 56 | +
|
| 57 | +This file uses dash markers consistently. |
| 58 | +
|
| 59 | +- First item |
| 60 | +- Second item |
| 61 | +- Third item |
| 62 | +
|
| 63 | +Nested list: |
| 64 | +
|
| 65 | +- Outer item |
| 66 | + - Inner item |
| 67 | + - Another inner item |
| 68 | +- Another outer item |
| 69 | +``` |
| 70 | + |
| 71 | +<?/include?> |
| 72 | + |
| 73 | +### Good -- nested rotation |
| 74 | + |
| 75 | +<?include |
| 76 | +file: good/nested.md |
| 77 | +wrap: markdown |
| 78 | +?> |
| 79 | + |
| 80 | +```markdown |
| 81 | +# Good nested with rotation |
| 82 | +
|
| 83 | +Outer lists use dash, inner use asterisk. |
| 84 | +
|
| 85 | +- Outer item |
| 86 | + * Inner item |
| 87 | + * Another inner item |
| 88 | +- Another outer item |
| 89 | + * More inner |
| 90 | + - Depth 2 cycles back to dash |
| 91 | + * Depth 3 cycles to asterisk |
| 92 | +``` |
| 93 | + |
| 94 | +<?/include?> |
| 95 | + |
| 96 | +### Bad -- wrong marker |
| 97 | + |
| 98 | +<?include |
| 99 | +file: bad/asterisk-with-dash.md |
| 100 | +wrap: markdown |
| 101 | +?> |
| 102 | + |
| 103 | +```markdown |
| 104 | +# Bad asterisk with dash config |
| 105 | +
|
| 106 | +This list uses asterisks but dash is configured. |
| 107 | +
|
| 108 | +* First item |
| 109 | +* Second item |
| 110 | +* Third item |
| 111 | +``` |
| 112 | + |
| 113 | +<?/include?> |
| 114 | + |
| 115 | +### Bad -- wrong nested marker |
| 116 | + |
| 117 | +<?include |
| 118 | +file: bad/nested-wrong.md |
| 119 | +wrap: markdown |
| 120 | +?> |
| 121 | + |
| 122 | +```markdown |
| 123 | +# Bad nested with wrong inner marker |
| 124 | +
|
| 125 | +Outer uses dash (correct), inner should use asterisk but uses dash. |
| 126 | +
|
| 127 | +- Outer item |
| 128 | + - Inner item should be asterisk |
| 129 | + - Another inner item should be asterisk |
| 130 | +- Another outer item |
| 131 | +``` |
| 132 | + |
| 133 | +<?/include?> |
| 134 | + |
| 135 | +## Meta-Information |
| 136 | + |
| 137 | +- **ID**: MDS045 |
| 138 | +- **Name**: `list-marker-style` |
| 139 | +- **Status**: ready |
| 140 | +- **Default**: disabled |
| 141 | +- **Fixable**: yes |
| 142 | +- **Implementation**: |
| 143 | + [source](./) |
| 144 | +- **Category**: list |
0 commit comments