Markdown Fixer

approved

by Muhammed Hunaid Topiwala

Fixes invisible Unicode characters, box-drawing tables, spaced pipe tables, spaced code blocks, and trailing whitespace — on paste or on demand. - This plugin has not been manually reviewed by Obsidian staff.

1 stars23 downloadsUpdated 11d agoMIT

Markdown 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":

FixerWhat it does
Fix invisible Unicode charactersStrips 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 tablesTurns Unicode box-drawing tables (┌───┬───┐ / │ … │) — common in terminal and CLI output — into standard Markdown pipe tables.
Fix spaced pipe tablesCollapses the excess alignment padding in pipe tables (| cell |) down to clean, minimal spacing.
Fix spaced code blocksRepairs fenced code blocks whose fences or contents picked up stray spacing on copy.
Trim trailing whitespaceRemoves trailing spaces and tabs at the end of every line.
Fix all spacing issuesRuns 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

  1. Download main.js and manifest.json from the latest release.
  2. Copy them into <your-vault>/.obsidian/plugins/markdown-fixer/.
  3. 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.

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.