![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
markdown-it-fancy-lists
Advanced tools
Extension for markdown-it to support additional numbering types for ordered lists
Plugin for the markdown-it markdown parser.
Uses unofficial markdown syntax based on the syntax supported by Pandoc. See the section Syntax below for details.
This library can be installed from the NPM package registry. Using NPM:
npm install markdown-it-fancy-lists
or Yarn
yarn add markdown-it-fancy-lists
ES module:
import * as MarkdownIt from "markdown-it";
import { markdownItFancyListPlugin } from "markdown-it-fancy-lists";
const parser = new MarkdownIt("default");
parser.use(markdownItFancyListPlugin);
parser.render(/* markdown string */);
CommonJS:
const MarkdownIt = require('markdown-it');
const markdownItFancyListPlugin = require("markdown-it-fancy-lists").markdownItFancyListPlugin;
const parser = new MarkdownIt("default");
parser.use(markdownItFancyListPlugin);
parser.render(/* markdown string */);
The supported markdown syntax is based on the one used by Pandoc.
A simple example:
i. foo
ii. bar
iii. baz
The will yield HTML output like:
<ol type="i">
<li>foo</li>
<li>bar</li>
<li>baz</li>
</ol>
A more complex example:
c. charlie
#. delta
iv) subfour
#) subfive
#) subsix
#. echo
A short description of the syntactical rules:
markdown-it
behavior for numeric lists, and
essentially also implements Pandoc's startnum
extension.All of the above are entirely compatible with how Pandoc works. There are two small differences with Pandoc's syntax:
Options can be provided as a second argument when registering the plugin:
parser.use(markdownItFancyListPlugin, {
/* options */
});
Supported configuration options:
allowOrdinal
- Whether to allow an ordinal indicator
(º
) after the numeral, as occurs in e.g. legal documents (default: false
). If this option is enabled,
input like
1º. foo
2º. bar
3º. baz
will be converted to
<ol class="ordinal">
<li>foo</li>
<li>bar</li>
<li>baz</li>
</ol>
You will need custom CSS to re-insert the ordinal indicator
into the displayed output based on the ordinal
class.
Because the ordinal indicator is commonly confused with other characters like the degree symbol, these characters are tolerated and considered equivalent to the ordinal indicator.
allowMultiLetter
- Whether to allow multi-letter alphabetic numerals, to number lists beyond 26
(default: false
). If this option is enabled, input like
AA. foo
AB. bar
AC. baz
will be converted to
<ol type="A" start="27">
<li>foo</li>
<li>bar</li>
<li>baz</li>
</ol>
Multi-letter alphabetic numerals can consist of at most 3 characters, which should be enough for a typical list. When a list starts with a numeral that can be both Roman or multi-letter alphabetic, like "II", it is considered to be Roman.
This project adheres to Semantic Versioning.
Contributions to this project are more than welcome. When reporting an issue, please include the input to reproduce the issue, along with the expected output. When submitting a PR, please include tests with your changes.
This project is released under the MIT license.
FAQs
Extension for markdown-it to support additional numbering types for ordered lists
The npm package markdown-it-fancy-lists receives a total of 668 weekly downloads. As such, markdown-it-fancy-lists popularity was classified as not popular.
We found that markdown-it-fancy-lists demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.