{"library":"mdformat-toc","title":"mdformat-toc","description":"A plugin for mdformat that automatically generates a table of contents (TOC) in Markdown documents. Version 0.5.0, requires Python >=3.9. Release cadence is low, maintained as part of the mdformat plugin ecosystem.","language":"python","status":"active","last_verified":"Sat May 09","install":{"commands":["pip install mdformat-toc"],"cli":null},"imports":["import mdformat_toc"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import mdformat\nimport os\n\n# Create a sample Markdown file\nmd_content = \"\"\"# Title\n\n## Section 1\n\nContent here.\n\n## Section 2\n\nMore content.\n\"\"\"\n\n# Format with mdformat, using the toc plugin\nformatted = mdformat.text(md_content, extensions={\"toc\"})\nprint(formatted)\n","lang":"python","description":"Formats a Markdown string and generates a table of contents using the plugin.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}