semvec/pypi-packages huggingface dataset:
neofoodclub 1.0.19
A Python implementation of functionality used in https://neofood.club
Requires Python: >=3.11

# neofoodclub.py

[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![image](https://img.shields.io/pypi/v/neofoodclub.svg)](https://pypi.python.org/pypi/neofoodclub)
[![image](https://img.shields.io/pypi/l/neofoodclub.svg)](https://github.com/diceroll123/neofoodclub.py/blob/main/LICENSE)
[![Actions status](https://github.com/diceroll123/neofoodclub.py/workflows/CI/badge.svg)](https://github.com/diceroll123/neofoodclub.py/actions)
[![image](https://img.shields.io/pypi/pyversions/neofoodclub.svg)](https://pypi.python.org/pypi/neofoodclub)

A mostly-Python implementation of functionality used in https://neofood.club/

Notes:

- _For the time being_, there are no front-facing docs for this beyond docstrings in the code itself

## Installing

**Python 3.11 or higher is required**

```sh
pip install neofoodclub
```

## Examples

_Since there is no obvious "first thing to do" with this library, simply refer to the examples folder for all examples._

## Links

- [Neofood.club](https://neofood.club/)
- [Neofood.club source](https://github.com/diceroll123/neofoodclub)
- [neofoodclub.rs](https://github.com/diceroll123/neofoodclub.rs)
mdformat-ado-toc 0.0.1
MDFormat plugin that preserves Azure DevOps [[_TOC_]] directive
Requires Python: >=3.10
Keywords: ado, azure-devops, formatter, markdown, mdformat, toc

# mdformat-ado-toc

An `mdformat` plugin that preserves Azure DevOps' `[[_TOC_]]` directive.
`mdformat` normally escapes it to `\[\[_TOC_\]\]`. This plugin treats it
as a custom block and renders it back verbatim.

## Problem

Azure DevOps wikis use `[[_TOC_]]` to generate a table of contents. However, when formatting markdown files with `mdformat`, the brackets get escaped to `\[\[_TOC_\]\]`, which breaks the TOC functionality.

## Solution

This plugin registers a custom parser extension that recognizes `[[_TOC_]]` as a special block element and preserves it without escaping during formatting.

## Install

```bash
pip install mdformat-ado-toc
# or from source
pip install -e .
```

## Usage

### Command Line

```bash
mdformat document.md --extensions ado_toc
```

### Python API

```python
import mdformat

text = """
# My Document

[[_TOC_]]

## Section 1
Content here.
"""

formatted = mdformat.text(text, extensions=["ado_toc"])
print(formatted)  # [[_TOC_]] is preserved!
```

## Features

- ✅ Preserves `[[_TOC_]]` without escaping brackets
- ✅ Handles surrounding whitespace correctly
- ✅ Supports multiple TOC markers in one document
- ✅ Works correctly when mixed with other markdown content
- ✅ Uses Python type hints and modern Python syntax

## Testing

```bash
pytest tests/test_plugin.py -v
```

## How It Works

The plugin implements a custom markdown-it parser rule that:
1. Intercepts lines containing `[[_TOC_]]` before they are parsed as paragraphs
2. Creates a custom `ado_toc` token for these lines
3. Renders the token back as the literal string `[[_TOC_]]` without escaping

## License

MIT