https://github.com/jasny/marked-more-lists
Marked extension for alphabetic and numeral lists
https://github.com/jasny/marked-more-lists
markdown markedjs
Last synced: 27 days ago
JSON representation
Marked extension for alphabetic and numeral lists
- Host: GitHub
- URL: https://github.com/jasny/marked-more-lists
- Owner: jasny
- License: mit
- Created: 2024-10-08T20:07:37.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-04-14T01:29:41.000Z (about 1 month ago)
- Last Synced: 2025-04-19T03:16:42.620Z (about 1 month ago)
- Topics: markdown, markedjs
- Language: JavaScript
- Homepage:
- Size: 2.19 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# marked-more-lists
This extension for the [marked](https://marked.js.org/) library adds support for rendering ordered lists with various
`type` attributes. It allows Markdown lists that start with `a.`, `A.`, `i.`, `I.`, and other patterns to be rendered
as `` elements with corresponding `type` values (e.g., `
`).
It also adds support for lists that start with a custom value or that skips values, by using the `value` attribute on
the list item.This enables more flexible list formatting in Markdown, enhancing the output to match the intended ordering style.
# Usage
```js
import {marked} from "marked";
import markedMoreLists from "marked-more-lists";// or UMD script
//
//marked.use(markedMoreLists());
const exampleMarkdown = `
1. item 1
2. item 2
a. item 2a
I. sub item I
II. sub item II
e. item 2e
7. item 7
`;marked.parse(exampleMarkdown);
//
//- item 1
//- item 2
//
//- item 2a
//
//- sub item I
//- sub item II
//
//- item 2e
//
//
//- item 7
//
```