bozhang24 downloads统一 Markdown 标点格式:中文标点转英文标点,并在中英文与数字之间自动补空格,链接 URL 自动豁免。
Normalize Markdown punctuation: convert Chinese punctuation to English punctuation, add spaces between Chinese and English/digits, and leave URLs inside links untouched.
English | 中文
共100元 → 共 100 元使用TypeScript开发 → 使用 TypeScript 开发你好,世界。 → 你好, 世界.苹果、香蕉 → 苹果, 香蕉——, 《》main.js, manifest.json and styles.css from the latest releasepunctilious folder inside your vault's .obsidian/plugins/Ctrl/Cmd + P to open the command palette| Command | Description |
|---|---|
| Normalize punctuation in current note | Formats the entire active note |
| Normalize punctuation in selection | Formats only the selected text; formats the whole note when nothing is selected |
| Before | After |
|---|---|
共100元 |
共 100 元 |
总共3个苹果和12个梨 |
总共 3 个苹果和 12 个梨 |
2026年是重要的一年 |
2026 年是重要的一年 |
- 2026年计划 |
- 2026 年计划 |
No leading space is added when the number sits at the beginning of a paragraph or a line.
| Before | After |
|---|---|
使用TypeScript开发 |
使用 TypeScript 开发 |
这是一个Obsidian插件 |
这是一个 Obsidian 插件 |
No leading space is added when the English text sits at the beginning of a paragraph or a line. No space is inserted between English and digits (iPhone15, v1.2.3 stay as they are).
Existing spaces are never duplicated:
使用 TypeScript 开发stays unchanged, and runs of multiple spaces collapse into one. When only one side has a space, just the missing side is filled in (for example共 100元→共 100 元).
A space is added after the converted punctuation. Opening brackets and quotes get the space before them instead, and any redundant space before a closing mark is removed.
| Before | After |
|---|---|
你好,世界。今天怎么样? |
你好, 世界. 今天怎么样? |
第一项;第二项:第三项 |
第一项; 第二项: 第三项 |
我(你)好 |
我 (你) 好 |
中文(English)结尾 |
中文 (English) 结尾 |
他说:“你好!” |
他说: "你好!" |
等等……还有 |
等等... 还有 |
Full conversion table:
| Chinese | English |
|---|---|
, |
, |
。 |
. |
、 |
, (can be disabled in settings) |
; |
; |
: |
: |
? |
? |
! |
! |
( ) |
( / ) |
【 】 |
[ / ] |
〔 〕, 〖 〗 |
[ / ] |
〈 〉 |
< / > |
“ ”, 「 」 |
" / " |
‘ ’, 『 』 |
' / ' |
~ |
~ |
…… |
... |
—— |
preserved |
《 》 |
preserved |
URLs are never modified and never get extra spaces:
参见[链接](https://example.com/docs?a=1&b=2#中文)与[[笔记/2026计划|我的计划]]。
becomes:
参见[链接](https://example.com/docs?a=1&b=2#中文)与[[笔记/2026计划|我的计划]].
Exempt content also includes image URLs, reference-style link definitions, <https://...> autolinks, bare URLs and Wiki link targets.
~~~) and inline code (`)$$...$$ / $...$)%%...%%)Open Settings → Punctilious to tune the rules.
| Setting | Default | Description |
|---|---|---|
| Add spaces between Chinese and English/digits | On | No space is added at the start of a line |
| Convert Chinese punctuation to English | On | Dashes and book title marks are always preserved |
| Add a space after punctuation | On | Adds a space after the converted punctuation |
| Convert ideographic comma to comma | On | Turn off to keep 、 as-is |
| Skip code blocks and math | On | Code and math are left untouched |
| Skip URLs in links | On | Link addresses are left untouched |
| Skip YAML frontmatter | On | Frontmatter is left untouched |
| Show completion notice | On | Shows a notice when formatting finishes |
data.json# Install dependencies
npm install
# Build in watch mode
npm run dev
# Production build
npm run build
# Lint
npm run lint
The project ships with two GitHub Actions workflows:
| Workflow | Trigger | Description |
|---|---|---|
.github/workflows/lint.yml |
Push and pull request on any branch | Runs npm ci, npm run build and npm run lint on Node.js 20.x / 22.x |
.github/workflows/release.yml |
Tag push | Builds the plugin and uploads main.js, manifest.json, styles.css and a zip archive as release assets |
npm version runs version-bump.mjs, which keeps manifest.json and versions.json in sync:
npm version patch # or minor / major
git push --follow-tags
Pushing the tag triggers the release workflow. The tag must match the version in manifest.json exactly (no leading v).