Skip to main content

svgbob extension for Python Markdown

Project description



This is an extension for Python Markdown which renders diagrams using svgbob.

You can try it out using the Svgbob Editor or the AsciiGrid Editor.


MIT License Supported Python Versions CalVer v202112.1022 PyPI Version PyPI Downloads

Code Quality/CI:

GitHub CI Status GitLab CI Status Type Checked with mypy Code Coverage Code Style: sjfmt

Name role since until
Manuel Barkhau ( author/maintainer 2019-04 -


$ pip install markdown-svgbob

This package includes the following binaries:

  • svgbob_0.5.5_x86_64-Darwin
  • svgbob_0.5.5_x86_64-Linux
  • svgbob_0.5.5_x86_64-Windows.exe

If you are on another platform, or want to use a more recent version of svgbob_cli, you will need to install rust and then svgbob via cargo.

$ curl -sSf | sh   # see
$ cargo install svgbob_cli

This extension will always use the installed version of svgbob if it is available.


In your markdown text you can define the block:

 .-/ / /->
( *  \/
 '-.  \
    \ /

The info string bob is chosen to match spongedown.


$ git clone
$ cd markdown-svgbob
$ make conda
$ make lint mypy test

MkDocs Integration

In your mkdocs.yml add this to markdown_extensions.

  - markdown_svgbob:
      tag_type: inline_svg
      bg_color: white
      fg_color: black
      min_char_width: 80

Valid options for tag_type are inline_svg (the default), img_utf8_svg and img_base64_svg.

The option min_char_width allows you to create diagrams of a uniform scale.

Changelog for


  • Upgrade svgbob binaries to 0.5.5


  • Upgrade to svgbob 0.6.2 for Linux
  • Packaging with lib3to6==202108.1048

I can't get newer binaries for windows or macos, contributions to svgbob would be welcome.


  • Fix: False positive warning due to 'toc' extension.


  • Fix: Close file descriptiors of Popen
  • Add support for blocks with extra backticks



  • Fix: bg_color not updated in some cases


  • Fix #2: Ignore trailing whitespace after closing fence.


  • Add: min_char_width option. Allows diagrams in a document to have a uniform scale.


  • Fix: Bad image substitution when markdown has multiple diagrams


  • Fix: Bad parsing of fences


  • Fix: use PEP 508 environment marker to not always install the typing package. Fixes gitlab#1


  • Add: bg_color and fg_color options


  • Fix: better error reporting
  • Fix: cleanup temp dir


  • Initial release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

markdown-svgbob-202112.1022.tar.gz (2.6 MB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page