pub async fn reanchor_inline_comment(
api: &ConfluenceApi,
page_id: &str,
comment_id: &str,
anchor_text: &str,
match_index: Option<usize>,
dry_run: bool,
) -> Result<ReanchorOutcome>Expand description
Moves the annotation mark of inline comment comment_id to a new run of
text (anchor_text) in the current-version ADF and writes the page back.
match_index (1-based) disambiguates when anchor_text occurs more than
once. The mark is removed from every run currently bearing it and re-applied
to the chosen run in a single mutated document, so the page is written in one
PUT — the server never observes a half-applied state.
When dry_run is true, the page is fetched, the move is computed, and the
resulting ADF is validated, but no write is performed — so callers can
preview (and surface anchor/validation errors) without mutating the page.
Operates entirely on ADF (atlas_doc_format); it never round-trips through
JFM, which would discard the annotation marks the anchor depends on.