% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scan_prompt.R
\name{.apply_redaction}
\alias{.apply_redaction}
\title{Apply span redaction}
\usage{
.apply_redaction(text, findings, redaction = NULL)
}
\arguments{
\item{text}{Text to redact.}

\item{findings}{Finding list.}

\item{redaction}{Redaction strategy from \code{\link[=redaction_strategy]{redaction_strategy()}}.}
}
\value{
Redacted text.
}
\description{
Replaces matched finding spans using a configured redaction strategy.
}
\details{
Findings can overlap, especially when one rule catches a broad credential
phrase and another catches a narrower token. This helper sorts and merges
spans before replacement. Replacements are applied from the end of the string
toward the beginning so offsets remain stable.
}
\keyword{internal}
