Skip to content

Commit d1502a5

Browse files
jdmonacoclaude
andcommitted
Update README for current implementation
- Add trailing whitespace removal and escaped link repair features - Fix frontmatter spacing description (all content gets tight spacing) - Add Compatible Plugins section with Obsidian vault recommendation - Fix pytest commands to use python -m pytest Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b70d4d8 commit d1502a5

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ An [mdformat](https://github.com/executablebooks/mdformat) plugin that provides
88
- **EditorConfig support**: Configure list indentation via `.editorconfig` files
99
- **Tight list formatting**: Automatically removes unnecessary blank lines between list items
1010
- **Frontmatter spacing**: Normalizes spacing after YAML frontmatter (works with [mdformat-frontmatter](https://github.com/butler54/mdformat-frontmatter))
11+
- **Trailing whitespace removal**: Strips trailing whitespace outside code blocks
12+
- **Escaped link repair**: Fixes malformed multi-line links from web-clipped content
1113

1214
## Installation
1315

@@ -91,10 +93,7 @@ Multi-paragraph items preserve loose formatting:
9193

9294
### Frontmatter Spacing
9395

94-
When used with [mdformat-frontmatter](https://github.com/butler54/mdformat-frontmatter), this plugin normalizes the spacing after YAML frontmatter:
95-
96-
- **Heading after frontmatter**: No blank line (tight)
97-
- **Other content after frontmatter**: Exactly one blank line
96+
When used with [mdformat-frontmatter](https://github.com/butler54/mdformat-frontmatter), this plugin removes blank lines between the frontmatter closing delimiter and the first content block:
9897

9998
**Before:**
10099
```markdown
@@ -143,17 +142,31 @@ finally:
143142
set_current_file(None)
144143
```
145144

145+
## Compatible Plugins
146+
147+
This plugin is tested to work alongside:
148+
149+
- [mdformat-frontmatter](https://github.com/butler54/mdformat-frontmatter) - YAML frontmatter parsing
150+
- [mdformat-wikilink](https://github.com/tmr232/mdformat-wikilink) - `[[wikilink]]` handling
151+
- [mdformat-simple-breaks](https://github.com/csala/mdformat-simple-breaks) - Line break handling
152+
153+
For formatting files in an **Obsidian vault**, installing `mdformat-frontmatter` and `mdformat-wikilink` alongside this plugin is recommended:
154+
155+
```bash
156+
pip install mdformat-space-control mdformat-frontmatter mdformat-wikilink
157+
```
158+
146159
## Development
147160

148161
```bash
149162
# Install dependencies
150163
uv sync
151164

152165
# Run tests
153-
uv run pytest
166+
uv run python -m pytest
154167

155168
# Run with coverage
156-
uv run pytest --cov=mdformat_space_control
169+
uv run python -m pytest --cov=mdformat_space_control
157170
```
158171

159172
## License

0 commit comments

Comments
 (0)