API

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

DegrotesqueRSTMarker

Bases: DegrotesqueBeginEndMarker

A class that returns the mask for restructuredText documents.

Code elements as well as links and references are masked.

get_mask(document, to_skip=None)

Returns a string where all protected text is denoted as '1' and everything else 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.