Giter Site home page Giter Site logo

purefun / remark-join-cjk-lines Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 712 KB

A remark plugin to remove extra space between CJK Characters.

License: MIT License

JavaScript 100.00%
markdown remark cjk-characters gatsby docusaurus remark-plugin

remark-join-cjk-lines's Introduction

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

remark-join-cjk-lines's People

Contributors

chitoku-k avatar dependabot[bot] avatar purefun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

chitoku-k

remark-join-cjk-lines's Issues

remark@next (13)

Hi!

remark is switching to a new parser internally (micromark, see remarkjs/remark#536 for more info).
From a quick glance at the code, it seems this plugin should be fine. However, it would be good to check that in the future (there is 13.0.0-alpha.0 published now, and one or two more will come before the release)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.