- Added latex support
- Added typst support
- Using dictionaries instead of match case when it makes sense
- Added magic comment support for LaTeX
- Placing TOC after module docstring in python files
- Updating file name in TOC in case file has been renamed
- Using pathlib to reference files
- Docstring matching
- HTML headings that span across multiple lines are now matched
- Added man and line numbers tests
- Added HTML tests
- Set maximum toc depth with
--depth int
- Using importlib.metadata.version() for
--version
- Static type checking
- Support for comments that start after spaces or tabs
- To run without being installed,
python -m toc.cli
must be used instead of./toc/cli.py
- Highlighted support for markup languages
- Added tests for files formatted by python-black
- Native reStructuredText support
- Native AsciiDoc support
- Added AsciiDoc and reStructuredText tests
- Native man pages support
- Line numbers to HTML toc
- Stdin support with "-" argument
- Set an arbitrary extension with "-e", useful for stdin
- Native HTML support
- Moved prefix and suffix to dedicated function
- Documented HTML and stdin support
- Avoiding replacing original match when writing toc
- Added stdin and ouput tests for cli script
- Added cli testing
- Optimized range in _prettify_connectors()
- Using single source for package version
- If
-o outputFile
is specified, toc will write there even if the inputFile's toc is already up-to-date - Drastic performance improvements by reducing regex and list iterations
- Support for rstudio foldable sections
- Added useful tools to CONTRIBUTING.md
- Explaining better what _prettify_connector() does
- Added code snippets to CONTRIBUTING.md
- Not stripping lines to preserve cobol indentation
- Avoiding printing twice the same error or warning message
- Simplified and explained _prettify_connectors()
- Unified comment replacement in _replace_comment()
- Defining toc multiline regex pattern once
- Centralized file opening function
- Storing toc pieces in lists until _generate_toc()
- Added complex toc nexting
- Added more unit tests to toc.py
- Added check for missing reference file
- Avoiding replacing builtins like "file", "input" and "list"
- Glob expansion support when parsing lists of files
- Read files from lists with
-l
- Man pages support (groff/mdoc)
- Native perl pod support
- Specify arbitrary output with
-o output_file
- Respect xml, doctype, vim and emacs directives
- Respect markdown frontmatters
- Split README.md in USAGE.md
- Updated changelog
- Renamed first example to file.c
- Limiting re.sub to 1 also if toc needs to be added
- Avoid re.sub if first line is empty
- Sanitizing input file type to str
- Fixed a bug thay may lead to multiple tocs being added
- Added new cases to test toc with empty or repeated first line of file
- Testing also cli script
- Not committing local test coverage
- Not considering files under tests/output
- Added input and reference test for testing
- Using re.search() instead of re.match(), removed re flags= where not needed
- Support for even more languages
- Added example comments to README.md
- Added PyPI url to README.md
- Added changelog
- Added changelog support through git-cliff
- Set PyPI project name to tableofcontents, added GH workflow for PyPI
- Rewriten
toc
in purepython
- Published to PyPI as
tableofcontents
- Added feature to prepend the table of contents to files, preserving shebangs
- Initial release of
toc
inbash
,perl
,sed
andawk