README file from
GithubMarkdown Fixer
An Obsidian plugin that cleans up messy Markdown — automatically when you paste, or on demand via commands. It fixes the artifacts that sneak in when you copy text from terminals, PDFs, chat apps, and AI tools: invisible Unicode characters, box-drawing tables, over-spaced pipe tables and code blocks, and trailing whitespace.
Features
Each fixer can be run on its own, and they're all chained together for paste and "fix all":
| Fixer | What it does |
|---|---|
| Fix invisible Unicode characters | Strips zero-width and other invisible Unicode characters (zero-width spaces, joiners, BOMs, etc.) that copy in from other apps and break search, links, and rendering. |
| Convert box-drawing tables | Turns Unicode box-drawing tables (┌───┬───┐ / │ … │) — common in terminal and CLI output — into standard Markdown pipe tables. |
| Fix spaced pipe tables | Collapses the excess alignment padding in pipe tables (| cell |) down to clean, minimal spacing. |
| Fix spaced code blocks | Repairs fenced code blocks whose fences or contents picked up stray spacing on copy. |
| Trim trailing whitespace | Removes trailing spaces and tabs at the end of every line. |
| Fix all spacing issues | Runs every fixer above in sequence and reports what it changed. |
Usage
- On paste (automatic): paste anywhere in a Markdown editor. If the pasted text contains any of the issues above, Markdown Fixer cleans it before it lands and shows a notice of what it fixed. If there's nothing to fix, paste behaves normally.
- Command palette: open it (
Ctrl/Cmd-P) and run any of the six commands (e.g. Markdown Fixer: Fix all spacing issues). Each command reports how many issues it fixed, or tells you there were none. - Ribbon icon: click the wrench in the left ribbon to run Fix all spacing issues on the current note.
No settings to configure, and no default hotkeys — bind your own in Settings → Hotkeys if you like.
Installation
From the community store
Once approved: Settings → Community plugins → Browse, search for Markdown Fixer, Install, then Enable.
Manual
- Download
main.jsandmanifest.jsonfrom the latest release. - Copy them into
<your-vault>/.obsidian/plugins/markdown-fixer/. - Reload Obsidian and enable Markdown Fixer in Settings → Community plugins.
Development
npm install # install dependencies
npm run dev # watch build
npm run build # type-check + production build → main.js
npm test # run the vitest suite
The converters live in src/converters/ and each is independently unit-tested in src/__tests__/; src/main.ts wires them into the paste handler and commands.