Optionalconfig: IHighlightSourceSettingsThe name of the plugin
Called each time the plugin's processor is run, before any other method of this plugin is called. Use this to add default settings to the request and to check that all required data is present in the response. If not, throw an [[ArgdownPluginError]] to cancel the the current processor's execution.
Use this method to do the main work outside of the Argdown AST. This is the last method to be called by the [[ArgdownApplication]].
A plugin that can be added to an [[ArgdownApplication]] with
app.AddPlugin(plugin, processorId).Can walk the Argdown AST by using
tokenListenersandruleListeners. Should use therunmethod for everything else.Plugins should avoid keeping any local mutable state. Instead they should use the provided request object for configuration and the provided response object for returning any produced or transformed data. The only exceptions are I/O operations (e.g. loading or saving files).
See the guide on writing custom plugins for more information.
Example