# Markdown Cleanup Clean up Markdown pasted from chat assistants, web pages, or other editors with a single command. The rules are tuned for Korean prose, but the bold, nbsp, and paragraph transforms work for any language. 한국어 요약: AI 답변이나 웹에서 붙여 넣은 마크다운의 볼드(`**`), ` `, 문장마다 끊긴 단락, 쌍점 띄어쓰기를 커맨드 하나로 정리합니다. ## Commands | Command | What it does | |---|---| | Strip bold | Removes `**` and `__bold__` markers outside code and math. | | Remove non-breaking spaces | Deletes lines that contain only ` ` and turns inline ` ` / U+00A0 into regular spaces. | | Merge single-sentence paragraphs | Joins runs of one-sentence paragraphs separated by blank lines into one paragraph. Headings, lists, tables, quotes, and code are left alone. | | Fix colon spacing | Rewrites `제목 : 값` as `제목: 값` (no space before, one space after), following the Korean punctuation rules (2014). Skips code, links, URLs, brackets, front matter, times such as `10:30`, and `file.ts:12`. | | Break lines at sentence boundaries | Rewraps plain paragraphs and quotes so every line ends at a sentence boundary, packing sentences up to 170 columns (CJK characters count as 2). | | Clean up all, then format with Prettier | Runs every transform above, then runs the Prettier plugin's "Format content" command. | Every command runs on the active note and reports what changed in a notice. If nothing changed, the notice explains why (for example, how much of the note is inside protected code blocks, or the line of an unclosed code fence). ## What is never touched - Fenced code blocks and inline code - Math (`$…$`, `$$…$$`) - YAML front matter (paragraph merging, colon spacing, line breaking) ## Prettier integration (optional) The last command calls the [Prettier](https://github.com/goodbyenjn/obsidian-plugin-prettier) community plugin if it is installed and enabled. Without it, the cleanup still runs and a notice tells you Prettier was not found. If you use the line-breaking transform together with Prettier, leave Prettier's `proseWrap` at its default (`preserve`). Both `always` and `never` rewrap the lines again. ## Installation Install from **Settings → Community plugins → Browse** and search for "Markdown Cleanup". Manual install: download `main.js` and `manifest.json` from the latest release into `/.obsidian/plugins/md-cleanup/`, then enable the plugin. ## License [MIT](LICENSE)