This document tracks compatibility risks for consumers adopting the new parser/AST authoring APIs and for future releases that may tighten contracts.
The implemented changes are additive/public-surface expansions:
InlineProcessor.ReplaceParentContainer(...) is now public.BlockProcessor.TakeLinesBefore() is public.BlockProcessor.IsOpen(Block) is public.BlockProcessor.TryDiscard(Block) is new.InlineProcessor.GetParserState(...) and InlineProcessor.Emit(...) are new.Block.Remove(), Block.ReplaceBy(...), ContainerBlock.TransferChildrenTo(...), and ContainerInline.TransferChildrenTo(...) are new.MarkdownPipelineBuilder.TrackTrivia setter is public.DataKey<T>, MarkdownObjectDataExtensions) are new.No runtime behavior change is required for existing consumers unless they opt into these APIs.
These are not implemented in this release, but consumers should avoid relying on ambiguous behavior.
ReplaceParentContainer replacement limitsCurrent contract allows a single replacement request per leaf pass. If this evolves to support multiple requests, error behavior and ordering guarantees may change.
Guidance:
Mutation helpers currently do not recalculate spans/trivia automatically. A future strict mode might validate or enforce metadata consistency.
Guidance:
Span, Line, Column, and trivia fields in transforms where source fidelity matters.Internal compatibility shims may be removed in a later major release after migration (for example, internal aliases kept during transition).
Guidance:
TakeLinesBefore, TryDiscard, etc.) directly.Some helper overloads share names with existing instance methods. Advanced consumers should prefer explicit generic invocations to avoid ambiguity.
Guidance:
node.SetData<MyType>(value)node.SetData<MyType>(key, value)node.GetData<MyType>(key)node.TryGetData<MyType>(key, out var value)TryDiscard where appropriate.TakeLinesBefore() instead of internal trivia helpers.ReplaceParentContainer(old, @new).RemoveAt(0) patterns) with transfer helpers.For a future major version, consider: