Gathering detailed insights and metrics for micromark-extension-cjk-friendly-gfm-strikethrough
Gathering detailed insights and metrics for micromark-extension-cjk-friendly-gfm-strikethrough
Make CommonMark more friendly for Japanese/Chinese/Korean (CommonMark next specification draft)—plugins & patched packages
npm install micromark-extension-cjk-friendly-gfm-strikethrough
Typescript
Module System
Min. Node Version
Node Version
NPM Version
68.1
Supply Chain
98.1
Quality
86
Maintenance
100
Vulnerability
100
License
markdown-it-cjk-friendly@1.0.3
Updated on Feb 24, 2025
remark-cjk-friendly@1.0.1
Updated on Feb 20, 2025
micromark-extension-cjk-friendly@1.0.1
Updated on Feb 20, 2025
micromark-extension-cjk-friendly-gfm-strikethrough@1.0.1
Updated on Feb 20, 2025
remark-cjk-friendly 1.0.0
Updated on Feb 13, 2025
micromark-extension-cjk-friendly 1.0.0
Updated on Feb 13, 2025
TypeScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
128
Last Day
4
Last Week
62
Last Month
128
Last Year
128
MIT License
6 Stars
105 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Feb 24, 2025
Latest Version
1.0.1
Package Id
micromark-extension-cjk-friendly-gfm-strikethrough@1.0.1
Unpacked Size
24.35 kB
Size
7.30 kB
File Count
6
NPM Version
10.9.2
Node Version
22.13.1
Published on
Feb 20, 2025
Cumulative downloads
Total Downloads
Last Day
33.3%
4
Compared to previous day
Last Week
-6.1%
62
Compared to previous week
Last Month
0%
128
Compared to previous month
Last Year
0%
128
Compared to previous year
6
3
A micromark extension to make GitHub Flavored Markdown (GFM) strikethrough (~~
) compatible with Chinese, Japanese, and Korean (CJK).
GitHub Flavored Markdown(GFM)の取り消し線記号(~~
)を日本語・中国語・韓国語にきちんと対応させるためのmicromark拡張
一个 micromark 扩展,用于使 GitHub Flavored Markdown(GFM)的删除线标记(~~
)能够正确支持中文、日语和韩语文本。
GitHub Flavored Markdown(GFM)의 취소선 기호(~~
)를 한국어, 중국어, 일본어와 호환되도록 만드는 micromark 확장
CommonMark has a problem that the following emphasis marks **
are not recognized as emphasis marks in Japanese, Chinese, and Korean.
CommonMarkには、日本語・中国語・韓国語内の次のような強調記号(**
)が強調記号として認識されない問題があります。
CommonMark存在以下问题:在中文、日语和韩语文本中,强调标记**
不会被识别为强调标记。
CommonMark는 일본어와 중국어에서 다음과 같은 강조 표시 **
가 강조 표시로 인식되지 않는 문제가 있습니다.
1**このアスタリスクは強調記号として認識されず、そのまま表示されます。**この文のせいで。 2 3**该星号不会被识别,而是直接显示。**这是因为它没有被识别为强调符号。 4 5**이 별표는 강조 표시로 인식되지 않고 그대로 표시됩니다(이 괄호 때문에)**이 문장 때문에.
This problem occurs because the character just inside the **
is a (Japanese or Chinese) punctuation mark (。) or parenthesis and the character just outside is not a space or punctuation mark.
これが起こった原因は、終了側の**
のすぐ内側が約物(。やカッコ)、かつ外側が約物や空白以外の文字であるためです。
这个问题是因为在**
的结束部分,内侧字符是标点符号(。)或括号,而外侧字符不是空格或标点符号。
이 문제는 **
바로 안쪽의 문자가 (일본어나 중국어) 문장 부호(。) 또는 괄호이고 바깥쪽 문자가 공백이나 문장 부호가 아니기 때문에 발생합니다.
Of course, not only the end side but also the start side has the same issue.
もちろん終了側だけでなく、開始側も同様の問題が存在します。
当然,不仅是结束侧,开始侧也存在同样的问题。
물론 끝나는 부분뿐만 아니라 시작하는 부분에서도 동일한 문제가 있습니다.
CommonMark issue: https://github.com/commonmark/commonmark-spec/issues/650
This behavior is also applied to the strikethrough (~~
) in GFM.
この挙動は、GFMの取り消し線(~~
)にも該当します。
这个行为也适用于 GFM 的删除线(~~
)。
이 동작은 GFM의 취소선(~~
)에도 해당됩니다.
This package uses the v
flag of the regular expression introduced in ES2024 to determine whether the character is an emoji or not.
本パッケージは文字が絵文字かどうかを判定するために、ES2024で導入された正規表現のv
フラグを使用しています。
本包使用 ES2024 引入的v
标志 来判断字符是否为 emoji。
이 패키지는 ES2024에서 도입된 v
플래그를 사용하여 문자가 이모지인지 여부를 판단합니다.
It makes this package compatible only with relatively recent browsers and Node.js:
このため、本パッケージは、次のような比較的新しいブラウザやNode.jsでしか動作しません。
因此,本包只兼容比较新的浏览器和 Node.js:
따라서, 이 패키지는 비교적 최신 브라우저와 Node.js에서만 작동합니다.
Install micromark-extension-cjk-friendly-gfm-strikethrough
via npm:
micromark-extension-cjk-friendly-gfm-strikethrough
をnpmでインストールしてください。
通过 npm 安装 micromark-extension-cjk-friendly-gfm-strikethrough
。
micromark-extension-cjk-friendly-gfm-strikethrough
를 npm으로 설치하세요.
1npm install micromark-extension-cjk-friendly-gfm-strikethrough
If you use another package manager, please replace npm install
with the command of the package manager you use (e.g. pnpm add
or yarn add
).
npm以外のパッケージマネージャを使う場合は、npm install
を当該パッケージマネージャのコマンド(例:pnpm add
・yarn add
)に置き換えてください。
如果使用其他包管理器,请将 npm install
替换为当时包管理器的命令(例如:pnpm add
、yarn add
)。
다른 패키지 매니저를 사용하는 경우 npm install
을 해당 패키지 매니저의 명령어(예: pnpm add
, yarn add
)로 바꾸어 주세요.
Import micromark
and micromark-extension-cjk-friendly-strikethrough
, and use the extension as follows:
micromark
とmicromark-extension-cjk-friendly-strikethrough
をインポートし、次のように拡張を使用してください。
通过 micromark
和 micromark-extension-cjk-friendly-strikethrough
导入,然后使用扩展如下:
micromark
와 micromark-extension-cjk-friendly-strikethrough
를 임포트하고 다음과 같이 확장을 사용하세요.
1import { micromark } from "micromark"; 2import { gfm, gfmHtml } from "micromark-extension-gfm"; 3import { cjkFriendlyExtension } from "micromark-extension-cjk-friendly"; 4import { gfmStrikethroughCjkFriendly } from "micromark-extension-cjk-friendly-gfm-strikethrough"; 5 6// e.g. combine with GFM extension 7const htmlString = micromark( 8 markdownString, 9 { 10 // gfmStrikethroughCjkFriendly() must be after gfm() 11 extensions: [gfm(), cjkFriendlyExtension(), gfmStrikethroughCjkFriendly()], 12 htmlExtensions: [gfmHtml()], 13 } 14)
[!IMPORTANT]
gfmStrikethroughCjkFriendly()
must be aftergfm()
, orgfmStrikethroughCjkFriendly()
will not work.
gfmStrikethroughCjkFriendly()
はgfm()
の後に入れてください。そうしないとgfmStrikethroughCjkFriendly()
は機能しません。
gfmStrikethroughCjkFriendly()
必须在gfm()
后面,否则gfmStrikethroughCjkFriendly()
将不起作用。
gfmStrikethroughCjkFriendly()
는gfm()
후에 입력하면서 작동합니다. 이는gfmStrikethroughCjkFriendly()
는 작동하지 않습니다.
The condition for ~~
to be recognized as a strikeout is the same as the condition for **
to be recognized as emphasis in the following CommonMark specification amendment suggestion:
https://github.com/tats-u/markdown-cjk-friendly/blob/main/specification.md (English)
Install the dependencies:
1pnpm install
Build the library:
1pnpm build
Build the library in watch mode:
1pnpm dev
No vulnerabilities found.
No security vulnerabilities found.