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
- Host: GitHub
- URL: https://github.com/dbolack-ab/marked-subsuper-text
- Owner: dbolack-ab
- License: mit
- Created: 2025-02-11T01:32:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-19T17:35:04.000Z (about 1 year ago)
- Last Synced: 2025-09-23T15:00:01.065Z (6 months ago)
- Topics: markdown, markedjs, subscript, superscript
- Language: JavaScript
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.
```