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 v202107.1018 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.4.1_x86_64-Darwin
  • svgbob_0.4.1_x86_64-Linux
  • svgbob_0.4.1_x86_64-Windows

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


  • 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.

Files for markdown-svgbob, version 202107.1018
Filename, size File type Python version Upload date Hashes
Filename, size markdown_svgbob-202107.1018-py2.py3-none-any.whl (4.4 MB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size markdown-svgbob-202107.1018.tar.gz (2.9 MB) File type Source Python version None Upload date Hashes View

Supported by

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