PluginMarkdownCodeBlockProcessorRegistrar.registerMarkdownCodeBlockProcessor method
PluginMarkdownCodeBlockProcessorRegistrar › registerMarkdownCodeBlockProcessor
Registers a markdown code block processor, unregistered when its lifetime owner unloads.Does nothing, and returns a no-op processor, when the plugin instance or the lifetime owner is not loaded. Obsidian
1.15.1's Component.register keeps a cleanup handed to an unloaded component without ever running it, so a processor registered by an instance that was unloaded while it was still loading (a plugin update, an install over an existing copy, a Hot Reload) would stay in Obsidian's global language map for the rest of the session, and the next registration of the same language would throw Code block postprocessor for language ... is already registered.Signature:
registerMarkdownCodeBlockProcessor(params: MarkdownCodeBlockProcessorRegistrarRegisterMarkdownCodeBlockProcessorParams): MarkdownPostProcessorParameters:
| Parameter | Type | Description |
|---|---|---|
| params | MarkdownCodeBlockProcessorRegistrarRegisterMarkdownCodeBlockProcessorParams | The parameters for the markdown code block processor. |
Returns: MarkdownPostProcessor — The markdown post processor.