⚠️ starting from version 9 all the functions are only accessible via the full module path. For example: md_toc.build_toc(...) is now md_toc.api.build_toc(...) ⚠️

Code fence

Code fence#

Code fences are sections of a markdown document where some parsers treat the text within them as verbatim. Usually the purpose of these sections is to display source code. Some programming languages use the character # as a way to comment a line in the code. For this reason md-toc needs to ignore code fences in order not to treat the # character as an ATX-style heading and thus get parsed as an element of the TOC.

cmark, github, gitlab#

The rules followed are the ones reported on the documentation:

redcarpet#

Needs to be implemented: