list-markup

Parses text and adds HTML markup around what it thinks are lists.

Usage no npm install needed!

<script type="module">
  import listMarkup from 'https://cdn.skypack.dev/list-markup';
</script>

README

node-list-markup

Parses text and adds HTML markup around what it thinks are lists.

Highly opinionated. At time of writing accepts the following styles of list:

 1. item
 1) item
 1 . item
 (1) item
 ( 1 ) item
 1) item
 1 ) item
 - item
 • item

Will convert the numbers into ordered-lists and glyphs into unordered-lists

Usage

listMarkup = require('list-markup');

var simpleString = 'String to be converted into list.';
var listyString = listMarkup.addMarkup(simpleString);