micromark-extension-jaruby
v0.1.4
Published
micromark extension to support Japanese ruby
Downloads
67
Maintainers
Readme
micromark-extension-jaruby
micromark extension to support Japanese ruby.
Feature
- compatible with remark / rehype / unified, using remark-jaruby or mdast-util-jaruby
- fully typed
Install
Node.js
npm install micromark-extension-jaruby
Usage
import { micromark } from "micromark";
import {
jaruby as syntax,
jarubyHtml as html,
} from "micromark-extension-jaruby";
const markdown = `
{聖剣}^(エクスカリバー)
`;
console.log(
micromark(markdown, {
extensions: [syntax()],
htmlExtensions: [html()],
}),
);
generates...
<p>
<ruby>聖剣<rp>(</rp><rt>エクスカリバー</rt><rp>)</rp></ruby>
</p>
Note
- This package is almost a refactoring of remark-ruby. Original package is licensed under MIT License.
- Support for text delimitation &
<rb>
tag in original package was omitted, since only few browsers can display it.