korean-markdown-fixer
v1.0.1
Published
한국어 마크다운 깨짐 교정 라이브러리. **이렇게** 마크다운이 깨지는 것을 고칩니다. Korean markdown fixer. It fixes markdown **like this case**.
Downloads
167
Maintainers
Readme
Korean Markdown Fixer
한글 마크다운 작성 시, 특수문자와 인접한 볼드(Bold) 처리가 깨지는 현상을 해결해주는 초경량 라이브러리입니다.
A lightweight utility to fix Markdown rendering issues where Korean text formatting (like Bold) breaks when adjacent to special characters.
The Problem
표준 마크다운 파서에서는, 한글이 특수문자와 인접해 있을 경우, 볼드(**)와 같은 문법이 렌더링 되지 않는 현상이 발생합니다.
In standard Markdown parsers, Korean characters combined with bold syntax (**) often fail to render correctly if they are immediately preceded by special characters or punctuation without spacing.
Example of the issue:
- As Is: **'중요'**합니다.
- To Be: '중요' 합니다.
The Solution
이 라이브러리는 정규식을 통해 해당 엣지 케이스에 공백을 추가하여 마크다운 파서가 formatting token을 올바르게 인식하도록 합니다.
This library automatically detects these edge cases using Regex and inserts a space to ensure the Markdown parser recognizes the formatting tokens correctly.
Installation
npm install korean-markdown-fixer
# or
pnpm add korean-markdown-fixer
# or
yarn add korean-markdown-fixerUsage
import { fixMarkdown } from "korean-markdown-fixer";
const raw = "이것은 **'중요'**합니다.";
const fixed = fixMarkdown(raw);
console.log(fixed); // space insertedContribution
문제가 생기거나, 좋은 아이디어가 있다면 여기서 이 라이브러리에 대한 기여를 해주세요!
If you have any problem or good ideas, please contribute to this library HERE!
