unified

Project: purefun/remark-join-cjk-lines

Package: remark-join-cjk-lines@1.0.9

  1. A remark plugin to remove extra space between CJK Characters

    remark-join-cjk-lines

    Node.js CI Node.js Package

    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.

    License

    MIT licensed