{"id":23458222,"url":"https://github.com/moxio/markdown-it-fancy-lists","last_synced_at":"2025-04-14T02:51:17.308Z","repository":{"id":46959864,"uuid":"333338328","full_name":"Moxio/markdown-it-fancy-lists","owner":"Moxio","description":"Extension for markdown-it to support additional numbering types for ordered lists ","archived":false,"fork":false,"pushed_at":"2024-02-12T10:56:42.000Z","size":57,"stargazers_count":11,"open_issues_count":1,"forks_count":4,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-10T18:06:33.379Z","etag":null,"topics":["commonmark","fancy-lists","markdown","markdown-it","markdown-it-plugin","ordered-list"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Moxio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-27T07:26:58.000Z","updated_at":"2025-01-22T20:30:05.000Z","dependencies_parsed_at":"2024-06-19T01:37:16.812Z","dependency_job_id":"724a6dac-5c86-495f-a3cd-6b53ecce7426","html_url":"https://github.com/Moxio/markdown-it-fancy-lists","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":"0.43999999999999995","last_synced_commit":"1cf8ad28ce3760c9de2e920de4dbf84f36c3265f"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fmarkdown-it-fancy-lists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fmarkdown-it-fancy-lists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fmarkdown-it-fancy-lists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Moxio%2Fmarkdown-it-fancy-lists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Moxio","download_url":"https://codeload.github.com/Moxio/markdown-it-fancy-lists/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813824,"owners_count":21165631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonmark","fancy-lists","markdown","markdown-it","markdown-it-plugin","ordered-list"],"created_at":"2024-12-24T05:17:38.829Z","updated_at":"2025-04-14T02:51:17.285Z","avatar_url":"https://github.com/Moxio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://img.shields.io/npm/v/markdown-it-fancy-lists.svg?style=flat)](https://www.npmjs.org/package/markdown-it-fancy-lists)\n\nmarkdown-it-fancy-lists\n=======================\n\nPlugin for the [markdown-it](https://github.com/markdown-it/markdown-it)\nmarkdown parser.\n\nUses unofficial markdown syntax based on the syntax supported by\n[Pandoc](https://pandoc.org/MANUAL.html#extension-fancy_lists).\nSee the section [Syntax](#syntax) below for details.\n\nInstallation\n------\nThis library can be installed from the NPM package registry. Using NPM:\n```\nnpm install markdown-it-fancy-lists\n```\nor Yarn\n```\nyarn add markdown-it-fancy-lists\n```\n\nUsage\n------\nES module:\n```javascript\nimport * as MarkdownIt from \"markdown-it\";\nimport { markdownItFancyListPlugin } from \"markdown-it-fancy-lists\";\n\nconst parser = new MarkdownIt(\"default\");\nparser.use(markdownItFancyListPlugin);\nparser.render(/* markdown string */);\n```\n\nCommonJS:\n```javascript\nconst MarkdownIt = require('markdown-it');\nconst markdownItFancyListPlugin = require(\"markdown-it-fancy-lists\").markdownItFancyListPlugin;\n\nconst parser = new MarkdownIt(\"default\");\nparser.use(markdownItFancyListPlugin);\nparser.render(/* markdown string */);\n```\n\n\nSyntax\n------\nThe supported markdown syntax is based on the one used by\n[Pandoc](https://pandoc.org/MANUAL.html#extension-fancy_lists).\n\nA simple example:\n```markdown\ni. foo\nii. bar\niii. baz\n```\nThe will yield HTML output like:\n```html\n\u003col type=\"i\"\u003e\n  \u003cli\u003efoo\u003c/li\u003e\n  \u003cli\u003ebar\u003c/li\u003e\n  \u003cli\u003ebaz\u003c/li\u003e\n\u003c/ol\u003e\n```\n\nA more complex example:\n```markdown\nc. charlie\n#. delta\n   iv) subfour\n   #) subfive\n   #) subsix\n#. echo\n```\n\nA short description of the syntactical rules:\n\n* Apart from numbers, also letters (uppercase or lowercase) and\n  Roman numerals (uppercase or lowercase) can be used to number\n  ordered list items. Like lists marked with numbers, they need to\n  be followed by a single right-parenthesis or period.\n* Changing list marker types (also between uppercase and lowercase,\n  or the symbol after the 'number') starts a new list.\n* The numeral of the first item determines the numbering of the list.\n  If the first item is numbered \"b\", the next item will be numbered\n  \"c\", even if it is marked \"z\" in the source. This corresponds to\n  the normal `markdown-it` behavior for numeric lists, and\n  essentially also implements [Pandoc's `startnum` extension](https://pandoc.org/MANUAL.html#extension-fancy_lists).\n* If the first list item is numbered \"I\" or \"i\", the list is considered\n  to be numbered using Roman numerals, starting at 1. If the list\n  starts with another single letter that could be interpreted as a\n  Roman numeral, the list is numbered using letters: a first item\n  marked with \"C.\" uses uppercase letters starting at 3, not Roman\n  numerals starting a 100.\n* In subsequent list items, such symbols can be used without any\n  ambiguity: in \"B.\", \"C.\", \"D.\" the \"C\" is the letter \"C\"; in\n  \"IC.\", \"C.\", \"CI.\" the \"C\" is a Roman 100.\n* A \"#\" may be used in place of any numeral to continue a list. If\n  the first item in a list is marked with \"#\", that list is numbered\n  \"1\", \"2\", \"3\", etc.\n* A list marker consisting of a single uppercase letter followed by\n  a period (including Roman numerals like \"I.\" or \"V.\") needs to be\n  followed by at least two spaces ([rationale](https://pandoc.org/MANUAL.html#fn1)).\n\nAll of the above are entirely compatible with how Pandoc works. There\nare two small differences with Pandoc's syntax:\n\n* This plugin does not support list numbers enclosed in parentheses,\n  as the Commonmark spec does not support these either for lists\n  numbered with Arabic numerals.\n* Pandoc does not allow any list to interrupt a paragraph. In the\n  spirit of the Commonmark spec (which allows only lists starting\n  with 1 to interrupt a paragraph), this plugins allows lists that\n  start with \"A\", \"a\", \"I\" or \"i\" (i.e. all 'first numerals') to\n  interrupt a paragraph. The same holds for the \"#\" generic numbered\n  list item marker.\n  For nested lists, any start number can interrupt a paragraph.\n\nConfiguration\n-------------\nOptions can be provided as a second argument when registering the plugin:\n```javascript\nparser.use(markdownItFancyListPlugin, {\n    /* options */\n});\n```\n\nSupported configuration options:\n\n* `allowOrdinal` - Whether to allow an [ordinal indicator](https://en.wikipedia.org/wiki/Ordinal_indicator)\n  (`º`) after the numeral, as occurs in e.g. legal documents (default: `false`). If this option is enabled,\n  input like\n  ```markdown\n  1º. foo\n  2º. bar\n  3º. baz\n  ```\n  will be converted to\n  ```html\n  \u003col class=\"ordinal\"\u003e\n    \u003cli\u003efoo\u003c/li\u003e\n    \u003cli\u003ebar\u003c/li\u003e\n    \u003cli\u003ebaz\u003c/li\u003e\n  \u003c/ol\u003e\n  ```\n  You will need [custom CSS](https://codepen.io/MoxioHD/pen/GRrjpRb) to re-insert the ordinal indicator\n  into the displayed output based on the `ordinal` class.\n\n  Because the ordinal indicator is commonly confused with other characters like the degree symbol, these\n  characters are tolerated and considered equivalent to the ordinal indicator.\n* `allowMultiLetter` - Whether to allow multi-letter alphabetic numerals, to number lists beyond 26\n  (default: `false`). If this option is enabled, input like\n  ```markdown\n  AA. foo\n  AB. bar\n  AC. baz\n  ```\n  will be converted to\n  ```html\n  \u003col type=\"A\" start=\"27\"\u003e\n    \u003cli\u003efoo\u003c/li\u003e\n    \u003cli\u003ebar\u003c/li\u003e\n    \u003cli\u003ebaz\u003c/li\u003e\n  \u003c/ol\u003e\n  ```\n  Multi-letter alphabetic numerals can consist of at most 3 characters, which should be enough for a\n  typical list. When a list starts with a numeral that can be both Roman or multi-letter alphabetic,\n  like \"II\", it is considered to be Roman.\n\nVersioning\n----------\nThis project adheres to [Semantic Versioning](http://semver.org/).\n\nContributing\n------------\nContributions to this project are more than welcome. When reporting an issue,\nplease include the input to reproduce the issue, along with the expected\noutput. When submitting a PR, please include tests with your changes.\n\nLicense\n-------\nThis project is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoxio%2Fmarkdown-it-fancy-lists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoxio%2Fmarkdown-it-fancy-lists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoxio%2Fmarkdown-it-fancy-lists/lists"}