schihei 0ecf6835c9 Add Markdown to Post Format command and fix non-breaking space before period
- New markdownToLinkedIn() function converts Markdown to LinkedIn/Facebook-ready text:
  ## headings → Unicode bold, **bold** → Unicode bold, _italic_ → Unicode italic,
  - list items → em-dash bullets; blank lines and heading spacing handled correctly
- New "Convert Markdown to Post Format" command registered in commands.ts
- Fix space-before-period cleanup to also strip U+00A0 (non-breaking space),
  which Obsidian inserts after bold/formatted text (/ \./g → /[ \u00A0]\./g)
- Update README to document the new command and updated function list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 17:15:32 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00
2026-03-19 19:00:24 +01:00

Unicode Text Formatter

An Obsidian plugin that transforms selected text into Unicode Mathematical Alphanumeric Symbols — Sans-Serif Bold, Italic, and Bold-Italic — for use in LinkedIn and Facebook posts.

Features

  • Unicode Bold — converts letters and digits to sans-serif bold (𝗔𝗕𝗖 / 𝗮𝗯𝗰 / 𝟬𝟭𝟮)
  • Unicode Italic — converts letters to sans-serif italic (𝘈𝘉𝘊 / 𝘢𝘣𝘤)
  • Unicode Bold Italic — converts letters to sans-serif bold italic (𝘼𝘽𝘾 / 𝙖𝙗𝙘)
  • Remove Unicode Formatting — converts any formatted Unicode characters back to plain ASCII
  • Convert List Bullets to Arrow — prefixes every selected line with , stripping any leading * marker first
  • Convert List Bullets to Em Dash — prefixes every selected line with , stripping any leading * marker first
  • Convert List to Numbered (Slash) — numbers every selected line as 1/ item, 2/ item, ..., stripping any leading * marker first
  • Convert List to Numbered (Parentheses) — numbers every selected line as (1) item, (2) item, ..., stripping any leading * marker first
  • Convert Markdown to Post Format — converts a Markdown selection to LinkedIn/Facebook-ready text: ## headings → bold, **bold** → Unicode bold, _italic_ → Unicode italic, - list items → em-dash bullets
  • Non-mapped characters (punctuation, spaces, emoji, etc.) are passed through unchanged

Usage

  1. Select text in the editor
  2. Open the Command Palette (Ctrl/Cmd + P)
  3. Run one of:
    • Format as Unicode Bold
    • Format as Unicode Italic
    • Format as Unicode Bold Italic
    • Remove Unicode Formatting — reverses any of the above back to plain ASCII
    • Convert List Bullets to Arrow — prefixes every line with (strips * if present)
    • Convert List Bullets to Em Dash — prefixes every line with (strips * if present)
    • Convert List to Numbered (Slash) — numbers every line as 1/ item, 2/ item, ... (strips * if present)
    • Convert List to Numbered (Parentheses) — numbers every line as (1) item, (2) item, ... (strips * if present)
    • Convert Markdown to Post Format — converts Markdown to LinkedIn/Facebook-ready text (headings, bold, italic, lists)

The selected text is replaced in place.

Installation

Manual

  1. Build the plugin (see Development) or download a release
  2. Copy main.js and manifest.json to your vault at:
    <VaultFolder>/.obsidian/plugins/unicode-text-formatter/
    
  3. In Obsidian: Settings → Community Plugins → Installed Plugins — enable Unicode Text Formatter

Development

Requirements: Node.js ≥ 16

npm install
npm run dev     # watch mode — recompiles on save
npm run build   # one-time production build
npm run lint    # ESLint check

Project structure

File Purpose
src/unicode-maps.ts Builds character lookup maps from Unicode code point ranges
src/formatter.ts transformText, cleanText, bulletToEmdash, bulletToArrow, numberedListSlash, numberedListParens, markdownToLinkedIn — text transformation functions
src/commands.ts Registers the nine editor commands with the Obsidian plugin API
src/main.ts Plugin entry point — calls registerCommands on load

Unicode blocks used

Style Uppercase Lowercase Digits
Sans-Serif Bold U+1D5D4U+1D5ED U+1D5EEU+1D607 U+1D7ECU+1D7F5
Sans-Serif Italic U+1D608U+1D621 U+1D622U+1D63B
Sans-Serif Bold-Italic U+1D63CU+1D655 U+1D656U+1D66F

Releasing

  1. Update manifest.json with the new version and minimum Obsidian version
  2. Update versions.json: "new-version": "min-obsidian-version"
  3. Create a GitHub release tagged with the exact version number
  4. Attach manifest.json and main.js as release assets

You can bump the version automatically:

npm version patch   # or minor / major

API Documentation

See https://docs.obsidian.md

S
Description
No description provided
Readme 0BSD 192 KiB
Languages
TypeScript 88.7%
JavaScript 7%
CSS 4.3%