JSPM

marked-definition-lists

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 43
  • Score
    100M100P100Q71752F
  • License MIT

Nonbreaking Spaces for Marked.js

Package Exports

  • marked-definition-lists
  • marked-definition-lists/lib/index.cjs
  • marked-definition-lists/lib/index.umd.js
  • marked-definition-lists/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (marked-definition-lists) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

marked-definition-lists

This module provides two styles of definition lists for use with marked.js

Inline Lists

Inline lists build each term and definition as a single line. A term is not required. Multiple lines will be placed in the same dictionary list ( <dl>).

My term :: My First Definition

PANdoc style lists

PANdoc style lists place the Term on the first line, follows by a series of definitions, preceded by :: until a blank line is reached. Text not preceeded by :: but before a blank line will be concatenated with the previous definition entry. Multiple Term and definistion set combinations will be placed in the same

Single Term, Single Definition

1Term 1 ::1Definition 1

Single Term, Plural Definitions

2Term 1 ::2Definition 1 ::2Definition 2

Multiple Term, Single Definitions

3Term 1 ::4Definition 1

3Term 2 ::3Definition 1

Multiple Term, Plural Definitions

4Term 1 ::41Definition 1 ::41Definition 2

4Term 2 ::42Definition 1 ::42Definition 2

Single Term, Single multiple line definition

5Term 1 ::5Definition 1 and more and more and more

Usage

const marked = require("marked");
const markedDefinitionLists = require("marked-definition-lists");

marked.use(markedDefinitionLists());

const html = marked.parse("My term :: My First Definition");
console.log(html);
// <dl><dt>My term</dt><dd>My First Definition</dd></dl>