Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Classes | Functions
myst_parser.config.main Namespace Reference

Classes

class  MdParserConfig
 
class  TopmatterReadError
 
class  UrlSchemeType
 

Functions

None check_extensions ("MdParserConfig" inst, dc.Field field, Any value)
 
None check_url_schemes ("MdParserConfig" inst, dc.Field field, Any value)
 
None check_sub_delimiters ("MdParserConfig" _, dc.Field field, Any value)
 
None check_inventories ("MdParserConfig" _, dc.Field field, Any value)
 
None check_heading_slug_func ("MdParserConfig" inst, dc.Field field, Any value)
 
str _test_slug_func (str text)
 
None check_fence_as_directive ("MdParserConfig" inst, dc.Field field, Any value)
 
MdParserConfig merge_file_level (MdParserConfig config, dict[str, Any] topmatter, Callable[[MystWarnings, str], None] warning)
 
dict[str, Any]|None read_topmatter (str|Iterator[str] text)
 

Detailed Description

The configuration for the myst parser.

Function Documentation

◆ _test_slug_func()

str myst_parser.config.main._test_slug_func ( str  text)
protected
Dummy slug function, this is imported during testing.

◆ check_extensions()

None myst_parser.config.main.check_extensions ( "MdParserConfig"  inst,
dc.Field  field,
Any  value 
)
Check that the extensions are a list of known strings

◆ check_fence_as_directive()

None myst_parser.config.main.check_fence_as_directive ( "MdParserConfig"  inst,
dc.Field  field,
Any   value 
)
Check that the extensions are a sequence of known strings

◆ check_heading_slug_func()

None myst_parser.config.main.check_heading_slug_func ( "MdParserConfig"  inst,
dc.Field  field,
Any   value 
)
Check that the heading_slug_func is a callable.

◆ check_inventories()

None myst_parser.config.main.check_inventories ( "MdParserConfig"  _,
dc.Field  field,
Any  value 
)
Check that the inventories are a dict of {str: (str, Optional[str])}

◆ check_sub_delimiters()

None myst_parser.config.main.check_sub_delimiters ( "MdParserConfig"  _,
dc.Field  field,
Any  value 
)
Check that the sub_delimiters are a tuple of length 2 of strings of length 1

◆ check_url_schemes()

None myst_parser.config.main.check_url_schemes ( "MdParserConfig"  inst,
dc.Field  field,
Any  value 
)
Check that the external schemes are of the right format.

◆ merge_file_level()

MdParserConfig myst_parser.config.main.merge_file_level ( MdParserConfig  config,
dict[str, Any]  topmatter,
Callable[[MystWarnings, str], None]  warning 
)
Merge the file-level topmatter with the global config.

:param config: Global config.
:param topmatter: Topmatter from the file.
:param warning: Function to call with a warning (type, message).
:returns: A new config object

◆ read_topmatter()

dict[str, Any] | None myst_parser.config.main.read_topmatter ( str | Iterator[str]  text)
Read the (optional) YAML topmatter from a source string.

This is identified by the first line starting with `---`,
then read up to a terminating line of `---`, or `...`.

:param source: The source string to read from
:return: The topmatter