An open API service indexing awesome lists of open source software.

https://github.com/dbolack-ab/marked-subsuper-text

Superscript and subscript extension for marked.js
https://github.com/dbolack-ab/marked-subsuper-text

markdown markedjs subscript superscript

Last synced: about 1 month ago
JSON representation

Superscript and subscript extension for marked.js

Awesome Lists containing this project

README

          

# marked-subsuper-text

Adds superscript and subscript notation to marked.js. Derived from Homebrewery.

## Superscript

Superscript is created by wrapping the text in a single caret (`^`). The wrapped text must ***not*** have leading or trailing spaces.

```
This is ^superscript^.
```

## Subscript

Subscript is performed by wrapping the text in double carets (`^^`). The wrapped text must ***not*** have leading or trailing spaces.

```
This is ^^subscript^^.
```

# Usage

```js
const marked = require("marked");
const markedSubSuper = require("marked-subsuper-text");

marked.use(markedSubSuper());

const html = marked.parse("This is ^^sub^^ and this is ^super^.");
console.log(html);
//

This is sub and this is super.


```