remark-join-cjk-lines
v1.0.13
Published
A remark plugin to remove extra space between CJK Characters
Downloads
461
Readme
remark-join-cjk-lines
remark-join-cjk-lines
is a remark plugin
to remove extra space between CJK Characters.
Installation
npm install remark-join-cjk-lines
# or
yarn add remark-join-cjk-lines
Usage
With Remark directly
const remark = require('remark');
const joinCJKLines = require('remark-join-cjk-lines');
remark()
.use(joinCJKLines)
.processSync(/*...*/);
With Gatsby
With gatsby-transformer-remark
:
// gatsby-config.js
plugins: [
{
resolve: `gatsby-transformer-remark`,
options: {
plugins: [require('remark-join-cjk-lines')],
},
},
],
With gatsby-plugin-mdx
:
// gatsby-config.js
plugins: [
{
resolve: 'gatsby-plugin-mdx',
options: {
extensions: ['.md', '.mdx'],
remarkPlugins: [require('remark-join-cjk-lines')],
gatsbyRemarkPlugins: [],
},
},
],
With Docusaurus v2
// docusaurus.config.js
module.exports = {
// ...
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
remarkPlugins: [require('remark-join-cjk-lines')],
},
},
],
],
};
Docusaurus's remarkPlugins take effect in build mode only.
NOTE: Run
gatsby clean
to take effect.