Creates an instance of DirectivesParser.
the full path to the file being processed.
The HTML code of the file being analyzed.
The current language if i18n is enabled.
The YASSB configuration object.
Tells DirectivesParser whether to clean or not the static property frontMatterData
.
The YASSB configuration object.
The HTML code of the file being analyzed.
the full path to the file being processed.
Tells DirectivesParser whether to clean or not the static property frontMatterData
.
The current language if i18n is enabled.
Store for all the data retrieved in Front Matter. Static so data persists between child instances of DirectiveParser
parsing nested components of the same parent file.
Regex to match the comments to invoke the directive.
Loops all component
directives and injects the content in current fileContents. Inside the loop a new instance of DirectivesParser
is initiated for each nested components found. In this way when the top level loop ends, the whole page is already available for the following directives
Analyzes the component directive, gets the content of the directive. After retrieving the contents it initializes a new DirectivesParser
on the content of the component to look for nested directives. The loop repeats until there are no more nested components.
full string of the directive to execute
Finds directives and executes them recursively. The first directives to be executed recursively is the component
directive. In this way when the other directives are executed the are presente with the full html code of the page.
Loops all built-in and custom directives and delegates to the Class the generation of the HTML. Applies the html to filecontents and if any data has been returned it is added in Front Matter.
Finds all the directives in the html code passed as
fileContents
and calls the executers on each. This acts also as the executer for thecomponent
directive. In this way thecomponent
directive is executed recursively on each component before all other directives.