Project: Darkhax/remark-underline

Package: remark-underline@1.0.5

  1. Dependents: 0
  2. A remark plugin which adds underline support by repurposing the "__" token.
  1. remark 212
  2. markdown 151
  3. plugin 138


npm version

A remark plugin that adds support for underlining. By default this is done by repurposing __ from the bold formatter. Bold also supports ** so repurposing __ is a popular choice for underlining text.


npm install remark-underline

For best results you should use remark-html or similar.


Import the plugin and then pass it into remark or your unified processor chain.

import remark from 'remark';
import html from 'remark-html';
import underline from 'remark-underline';

remark.use(html).use(underline).process("__hello world__");

With the plugin the output will be

  <ins class="underline">hello world</ins>

Without the plugin the output will be

  <strong>hello world</strong>


You may supply an optional options object to configure the plugin. These are the options currently supported.


    const underlineOptions = {
        marker: '!!',
        classNames: ['thing1', 'thing2']

    remark().use(html).use(underline, underlineOptions).process("!!I Am Underline!!");


MIT © Darkhax