1.1.4 • Published 12 months ago

rehype-budoux v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

rehype-budoux

About

rehype plugin to insert wbr using BudouX.

Installation

npm install rehype-budoux
yarn add rehype-budoux
pnpm install rehype-budoux
bun add rehype-budoux

Usage

import { rehype } from "rehype";
import rehypeBudoux from "rehype-budoux";

const result = await rehype()
  .data("settings", {
    fragment: true
  })
  .use(rehypeBudoux, {
    className: "budoux-breaked"
  })
  .process("<p>こんにちは、世界!</p>");

// -> <p class="budoux-breaked">こんに<wbr>ちは、<wbr>世界!</p>
console.log(result.toString());

API

Document

Options

Configuration (TypeScript type).

Fields

  • className?: string | string[] - Class name to be attached to the element into which the wbr element is inserted
1.1.1

1 year ago

1.1.0

1 year ago

1.1.4

12 months ago

1.1.3

12 months ago

1.1.2

1 year ago

1.0.0

1 year ago