Skip to content

Releases: erbsland-dev/erbsland-sphinx-ansi

Release 1.2.4 - Restoring Integration Compatibility

10 Jun 07:46
62861b6

Choose a tag to compare

This patch release restores compatibility with integrations that construct ANSI literal blocks using the classic docutils literal_block(rawsource, text) calling style.

Fixed

  • Restored the positional text argument for ANSILiteralBlock.
  • Fixed compatibility with sphinxcontrib-programoutput when programoutput_use_ansi = True, where output nodes are created as ANSILiteralBlock(output, output).
  • Added regression tests for the two-argument construction through both HTML and non-HTML parser paths.

Documentation

  • Improved the README and main documentation with clearer feature descriptions.
  • Clarified that erbsland-sphinx-ansi renders ANSI text styling but is not a terminal emulator.
  • Added guidance for preprocessing terminal output with erbsland-ansi-convert when output depends on cursor movement, screen clearing, or other terminal control behavior.

Maintenance

  • Added missing utility library files that were previously excluded by .gitignore.

Update dependencies and project configuration

28 May 09:55
82f9555

Choose a tag to compare

This release focuses on maintenance updates and project configuration improvements. No functional changes have been made to the extension itself.

  • Updated the documented and configured Python version requirement to 3.13 in both the documentation and pyproject.toml.
  • Refreshed requirements-dev.txt and updated the associated dependency hashes.
  • Adjusted Hatch configuration for improved Python 3.13 compatibility.

Improve compatibility, build tooling, and project maintenance

28 May 08:44
f9b2481

Choose a tag to compare

This release focuses on improving compatibility with JavaScript-based syntax highlighters, strengthening the build infrastructure, and streamlining development workflows.

  • Wrapped the <pre> output in an additional <div> container to improve compatibility with JavaScript-based Pygments formatters.
  • Added the nohighlight CSS class to both the <pre> and <div> elements for the same compatibility reasons.
  • Refactored the internal AST type into a dedicated container structure.
  • Hardened the build process and improved the GitHub workflow configuration.
  • Introduced additional build utilities, including a pre_commit action.
  • Updated all project dependencies to their latest compatible versions.

Fix built-in stylesheet background color handling

27 Mar 07:31
475277d

Choose a tag to compare

Corrected an issue where extended background colors were not applied properly in the built-in stylesheet.

Maintenance Release with Updated Hatch Configuration

24 Mar 15:55
514e7c7

Choose a tag to compare

This is a maintenance release focused on packaging, testing, and development workflow improvements. There are no functional changes to the Sphinx ANSI extension itself compared with v1.1.2.

What's changed

  • Added docutils to the test and build environments to make CI and package builds more reliable.
  • Updated the Hatch configuration to support hatch test and uv run pytest (#1 by henryiii).
  • Refreshed development dependency versions in requirements-dev.txt.
  • Clarified development requirements in the README.
  • Added uv.lock to .gitignore.

Add Handling for CSI Sequences and Partial Resets

24 Mar 14:59
02d869d

Choose a tag to compare

This release improves how ANSI control sequences are processed, making it easier for you to work with terminal output directly.

Improvements

  • Unknown CSI (Control Sequence Introducer) sequences are now safely ignored and removed from the output.
  • This allows you to use more terminal output directly in the extension without requiring pre-filtering.
  • Support for partial color reset sequences has been added and is now handled correctly.

Important Notes

The extension intentionally does not implement full terminal emulation in order to maintain high performance.

If your output includes complex terminal behavior (for example, cursor movements or dynamic updates), you should preprocess it before use.

We recommend using erbsland-py-ansi-convert for this purpose.

This ensures that the output is normalized and compatible with the extension.

Summary

With these changes, you can rely on cleaner and more predictable handling of ANSI sequences, while still keeping full control over performance and preprocessing when needed.

Expand Python compatibility and add theme support

18 Feb 22:29
c277be4

Choose a tag to compare

  • Lower minimum Python requirement from 3.12+ to 3.10+
  • Add theme support via the theme parameter
  • Remove IDE-specific files from the repository

Update Hatch build config to adjust the package path

18 Feb 10:53
1ec4f1d

Choose a tag to compare

A misconfigured package path in the Hatch build configuration prevented the package from being installed correctly in certain environments.

This release fixes the build configuration so the package is now installed properly via pip and other standard tooling.

If you experienced installation issues with previous versions, please upgrade to this release.

Initial Public Release

18 Feb 10:40
d7bf05b

Choose a tag to compare

We are happy to announce the first public release of erbsland-sphinx-ansi — a lightweight Sphinx extension for rendering ANSI-colored terminal output directly in your documentation.

If you document command-line tools, build logs, CI output, or interactive sessions, this extension allows you to keep realistic, colorized terminal examples in your HTML documentation without screenshots or manual styling.

Features

  • Render ANSI color and formatting codes inside Sphinx documentation
  • Clean integration via a dedicated .. erbsland-ansi:: directive
  • Optional :escape-char: parameter for readable source files
  • Lightweight and easy to integrate
  • No additional configuration required beyond enabling the extension

If you encounter issues or have feature suggestions, feel free to open an issue or discussion on GitHub.