ford.md_environ module#

class ford.md_environ.EnvironExtension(**kwargs)#

Bases: Extension

Extension: ${VARNAME} will be replaced by contents of environment variable VARNAME, it it is defined, or by an empty string otherwise.

extendMarkdown(md, *args, **kwargs)#

Insert ‘environ’ pattern before ‘not_strong’ pattern.

class ford.md_environ.EnvironPattern(pattern, md=None)#

Bases: Pattern

Pattern to pick out environment variables and insert their value.

handleMatch(m)#

Return a ElementTree element from the given match.

Subclasses should override this method.

Keyword arguments:

  • m: A re match object containing a match of the pattern.

ford.md_environ.makeExtension(**kwargs)#

Inform Markdown of the existence of the extension.