aboutsummaryrefslogtreecommitdiff
path: root/docs/langs.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-12 18:12:53 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-12 18:12:53 -0400
commita3c4e0a82d5b56e280cbf72af2ecf5a990b1f577 (patch)
treee7b386efbe57d6c922130f56e056d62d8ee012ad /docs/langs.md
parent904917a2bd3b2e03bf2c399b5bc5f5e357d404a2 (diff)
Rename `without_escaping()` -> `from_text()`
Diffstat (limited to 'docs/langs.md')
-rw-r--r--docs/langs.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/langs.md b/docs/langs.md
index f087b31c..0e6242db 100644
--- a/docs/langs.md
+++ b/docs/langs.md
@@ -18,7 +18,7 @@ lang HTML:
$/"/ = "&quot",
$/'/ = "&#39;",
})
- return HTML.without_escaping(t)
+ return HTML.from_text(t)
func paragraph(content:HTML -> HTML):
return $HTML"<p>$content</p>"
@@ -75,7 +75,7 @@ instead of building a global function called `execute()` that takes a
```tomo
lang Sh:
convert(text:Text -> Sh):
- return Sh.without_escaping("'" ++ text:replace($/'/, "''") ++ "'")
+ return Sh.from_text("'" ++ text:replace($/'/, "''") ++ "'")
func execute(sh:Sh -> Text):
...
@@ -94,11 +94,11 @@ another type's block or at the top level.
```tomo
lang Sh:
convert(text:Text -> Sh):
- return Sh.without_escaping("'" ++ text:replace($/'/, "''") ++ "'")
+ return Sh.from_text("'" ++ text:replace($/'/, "''") ++ "'")
struct Foo(x,y:Int):
convert(f:Foo -> Sh):
- return Sh.without_escaping("$(f.x),$(f.y)")
+ return Sh.from_text("$(f.x),$(f.y)")
convert(texts:[Text] -> Sh):
return $Sh" ":join([Sh(t) for t in texts])