ReplaceBy(Block, Boolean) Method

Definition

Namespace Markdig.Syntax
Assembly Markdig.dll

Replaces this block with replacement in its parent container.

public void ReplaceBy(Block replacement, bool moveChildren = true)

Parameters

replacement
Block

The replacement block.

moveChildren
Boolean

true to transfer children when both this block and replacement are containers.

Remarks

This method does not recompute spans or trivia. Callers are responsible for updating those values if a transform requires exact source information after replacement.