Klasse MarkdownProcessor

java.lang.Object
io.github.astrapisixtynine.markdownslugger.core.MarkdownProcessor

public class MarkdownProcessor extends Object
MarkdownProcessor executes a pipeline of MarkdownProcessingStep instances Each step modifies or enriches the provided MarkdownContext This processor can be used to extract headings, generate slugs, create a TOC, inject anchor IDs, and more
  • Konstruktordetails

    • MarkdownProcessor

      public MarkdownProcessor()
  • Methodendetails

    • addStep

      Adds a new processing step to the Markdown pipeline
      Parameter:
      step - the MarkdownProcessingStep to be added
      Gibt zurück:
      the MarkdownProcessor instance, enabling fluent chaining
    • process

      public void process(MarkdownContext context)
      Runs all configured processing steps in order on the given context
      Parameter:
      context - the MarkdownContext to be processed and enriched
    • defaultPipeline

      public static MarkdownProcessor defaultPipeline(SlugStrategy slugStrategy)
      Creates a default pipeline of steps using the provided SlugStrategy Includes heading extraction, slug mapping, TOC generation, and anchor injection
      Parameter:
      slugStrategy - the strategy to use for generating slugs
      Gibt zurück:
      a fully configured MarkdownProcessor