Add remark-cjk-friendly(-gfm-strikethrough) to plugins.md#1422
Add remark-cjk-friendly(-gfm-strikethrough) to plugins.md#1422wooorm merged 1 commit intoremarkjs:mainfrom
remark-cjk-friendly(-gfm-strikethrough) to plugins.md#1422Conversation
remark-cjk-friendly(-gfm-strikethrough) in plugins.mdremark-cjk-friendly(-gfm-strikethrough) to plugins.md
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1422 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 142 138 -4
=========================================
- Hits 142 138 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I adopted it only for libraries because the language server recommends There are .d.ts files in NPM: https://www.npmjs.com/package/remark-cjk-friendly?activeTab=code / https://www.npmjs.com/package/remark-cjk-friendly-gfm-strikethrough?activeTab=code There is only single .js file in both remark plugin packages. https://www.npmjs.com/package/remark-cjk-friendly?activeTab=code / https://www.npmjs.com/package/remark-cjk-friendly-gfm-strikethrough?activeTab=code
The structure of the code is mostly kept except for the long prefix |
|
My remark plugins only register corresponding micromark extensions as remark-gfm does. |
Your code is a library.
https://www.typescriptlang.org/docs/handbook/modules/reference.html#node16-node18-nodenext
NPM does not recognize them, it expects a type property https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#including-declarations-in-your-npm-package
They already support it with |
I'm commenting on the remark plugins, because you are asking the remark team to recommend them. |
My repo contains demo applications for Docusaurus, Rspack, and Astro. Their tsconfig has not been changed. Important tsconfig is not bundles into my packages. It is used only when built by Rslib. tats-u/markdown-cjk-friendly@968978b
I tried it but it didn't erase the super long variable prefix. It doesn't have effect if the number of .ts file is just one. |
You may not need rslib at all. |
Right, when it is used by the typescript compiler it is producing a potentially wrong output. |
Prettier doesn't have the top-level https://www.npmjs.com/package/prettier?activeTab=code
markdown-it plugins are out of the unified ecosystem. I won't turn off bundling it. (in the first place
If I didn't use
Many libraries use tsup and I recognize Rslib plays the same role. I've started trying it, and the output looks better. However, the build time seems to be longer than Rslib. |
That works for actual code.
Sounds good.
Or you could write valid JavaScript that works in Node LTS, which is already fairly modern and skip the transpilers. 🙂
Okay, you may not need tsup either |
|
LGTM
I hear you 🙂 Line 9 in 06ac0b5 And ts gives some insurance that the code will work as is |
|
I know Node 16 is EOL, but started adopting the Prettier's policy and setting the minimum version as that of micromark: https://github.com/prettier/prettier/wiki/The-policy-to-drop-Node.js-version ES2021 is the version said to be the supported version by Node 16. https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
Tsc doesn't provide a transpilation of the |
|
Do you have anything else that you still concerned about? |
|
Is the nested entry OK? |
|
No, thank you. Please keep with the style that is in place. Please use short descriptions. In-depth information can go in your documentation. |
Do you still think "make emphasis in CJK languages more reliably recognized" is too long? How can I make it shorter than "recognize emphasis in CJK languages more reliably"? |
This comment has been minimized.
This comment has been minimized.
|
Thank you! |
Initial checklist
I included tests (or that’s not needed)(N/A)Description of changes
Adds the following plugins to plugins.md:
remark-cjk-friendlyremark-cjk-friendly-gfm-strikethroughCommonMark's emphasis specification is unfriendly to CJK languages. (c.f. #1107 and #1288). These plugins mitigate this problem and are served as a public test for a new Commonmark specification candidate.
repo: https://github.com/tats-u/markdown-cjk-friendly/