mon message. */}}
      {{- $msg := printf "%q: heading ID %q not found in %q" $contentPath . $targetPath }}
      {{- if eq $targetPath $contentPath }}
        {{- $msg := printf "%q: heading ID %q not found" $contentPath . }}
      {{- end }}
      {{- /* Throw warning or error. */}}
      {{- if eq $errorLevel "warning" }}
        {{- warnf $msg }}
      {{- else if eq $errorLevel "error" }}
        {{- errorf $msg }}
      {{- end }}
    {{- end }}
  {{- end }}
{{- end }}