content: find-replace covers callout text + 2 tests (752/752)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 53s

fr-has-text? now treats callout as text-bearing, matching asText/stats/
summary. content/find-replace previously skipped callout bodies silently.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 11:10:25 +00:00
parent 94b889c911
commit 92c0c853a9
5 changed files with 47 additions and 10 deletions

View File

@@ -1,8 +1,9 @@
;; content-on-sx — global find/replace across text-bearing blocks.
;;
;; Replaces every occurrence of `from` with `to` in the text field of text /
;; heading / code / quote blocks, tree-wide (via the transform layer). For
;; renaming a term throughout a document. Immutable; case-sensitive.
;; Replaces every occurrence of `from` with `to` in the `text` field of
;; text / heading / code / quote / callout blocks, tree-wide (via the transform
;; layer). For renaming a term throughout a document. Immutable; case-sensitive.
;; (Same text-bearing set asText/stats/summary treat as content.)
;;
;; Requires (loaded by harness): block.sx, transform.sx (content/map-blocks).
@@ -17,7 +18,9 @@
(define
fr-has-text?
(fn (b) (fr-in? (blk-type b) (list "text" "heading" "code" "quote"))))
(fn
(b)
(fr-in? (blk-type b) (list "text" "heading" "code" "quote" "callout"))))
(define
content/find-replace