API

Module holding a class that computes the mask for Markdown documents.

DegrotesqueMDMarker

Bases: DegrotesqueMarker

A class that returns the mask for markdown text.

Code elements - indented and ones that use tripe-` are masked as well as links.

get_extensions()

Returns the extensions of file types that can be processed using this marker.

Returns:
  • List[str]

    A list of extensions

get_mask(document, to_skip=None)

Returns a string where all code and quotes are denoted as '1' and plain content as '0'.

Parameters:
  • document (str) –

    The markdown document (contents) to process

  • to_skip (List[str], default: None ) –

    List of elements to skip (HTML/SGML/XML)

Returns:
  • str

    Annotation of the markdown document.