Interface LaravelUi5\Sdk\Help\Contracts\MarkdownEnvironmentFactoryInterface

Factory for the CommonMark {@see Environment} the Help pipeline renders with — the domain's public customization seam. Rebind it in a host's service provider to add or drop extensions; everything else in the Help domain is internal.

A fresh Environment per call, because the callers attach document-specific listeners to it: {@see \LaravelUi5\Sdk\Help\DocumentProducer} attaches the content processor with that document's asset base URI, and {@see \LaravelUi5\Sdk\Help\IndexProducer} attaches the plain-text extractor.

Implementations MUST:

  • construct a fresh Environment for each call and return it (not a MarkdownConverter — the caller builds the converter);
  • register CommonMarkCoreExtension and FrontMatterExtension, because the pipeline reads frontmatter through the parsed document;
  • leave the attaching of listeners to the caller.

The shipped default registers Core, FrontMatter, Footnotes, Attributes and Tables — deliberately no heading permalinks (they would clutter the help viewer) and no table of contents.

  • LaravelUi5\Sdk\Help\Contracts\MarkdownEnvironmentFactoryInterface
    • LaravelUi5\Sdk\Help\Markdown\MarkdownEnvironmentFactory implements MarkdownEnvironmentFactoryInterface
Methods