diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-03 13:45:30 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-03 13:45:30 -0500 |
| commit | f330f06c218a0903530cdc51c0fac245cb51ae75 (patch) | |
| tree | 7e4220790a846cbd05190149edd3a61ce795b752 /environment.c | |
| parent | 80475ad02d6b20d6c667c3be8bc939a83632bd3f (diff) | |
Add `recursive` argument to text:each() and text:map(), plus update docs
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/environment.c b/environment.c index f9b9a46f..093b8c79 100644 --- a/environment.c +++ b/environment.c @@ -393,7 +393,7 @@ env_t *new_compilation_unit(CORD libname) {"bytes", "Text$utf8_bytes", "func(text:Text -> [Byte])"}, {"codepoint_names", "Text$codepoint_names", "func(text:Text -> [Text])"}, {"ends_with", "Text$ends_with", "func(text,suffix:Text -> Bool)"}, - {"each", "Text$each", "func(text:Text, pattern:Pattern, fn:func(match:Match))"}, + {"each", "Text$each", "func(text:Text, pattern:Pattern, fn:func(match:Match), recursive=yes)"}, {"find", "Text$find", "func(text:Text, pattern:Pattern, start=1 -> Match?)"}, {"find_all", "Text$find_all", "func(text:Text, pattern:Pattern -> [Match])"}, {"from", "Text$from", "func(text:Text, first:Int -> Text)"}, @@ -406,7 +406,7 @@ env_t *new_compilation_unit(CORD libname) {"join", "Text$join", "func(glue:Text, pieces:[Text] -> Text)"}, {"lines", "Text$lines", "func(text:Text -> [Text])"}, {"lower", "Text$lower", "func(text:Text -> Text)"}, - {"map", "Text$map", "func(text:Text, pattern:Pattern, fn:func(match:Match -> Text) -> Text)"}, + {"map", "Text$map", "func(text:Text, pattern:Pattern, fn:func(match:Match -> Text), recursive=yes -> Text)"}, {"matches", "Text$matches", "func(text:Text, pattern:Pattern -> [Text]?)"}, {"quoted", "Text$quoted", "func(text:Text, color=no -> Text)"}, {"repeat", "Text$repeat", "func(text:Text, count:Int -> Text)"}, |
