aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-24 13:26:49 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-24 13:26:49 -0400
commit800e386105255c9c4faa9a7051b100a8768a70de (patch)
treed1e8b6b221485330b92d225f32c29337d81b6675 /docs
parent0609a26f3108148375d4ee2fb3d2d8f9c5756ae7 (diff)
Rename `from_unsafe_text` to `without_escaping`
Diffstat (limited to 'docs')
-rw-r--r--docs/langs.md4
-rw-r--r--docs/paths.md2
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/langs.md b/docs/langs.md
index 7e1bd7ef..0eecb3cd 100644
--- a/docs/langs.md
+++ b/docs/langs.md
@@ -18,7 +18,7 @@ lang HTML:
$/"/: "&quot",
$/'/: "&#39;",
})
- return HTML.from_unsafe_text(t)
+ return HTML.without_escaping(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:
func escape(text:Text)->Sh:
- return Sh.from_unsafe_text("'" ++ text:replace($/'/, "''") ++ "'")
+ return Sh.without_escaping("'" ++ text:replace($/'/, "''") ++ "'")
func execute(sh:Sh)->Text:
...
diff --git a/docs/paths.md b/docs/paths.md
index f53cc971..b1f03fff 100644
--- a/docs/paths.md
+++ b/docs/paths.md
@@ -33,7 +33,7 @@ not be trustworthy and interpret that value as a single path component name,
i.e. the name of a directory or file. If a user were to supply a value like
`..` or `foo/baz`, it would risk navigating into a directory other than
intended. Paths can be created from text with slashes using
-`Path.from_unsafe_text(text)` if you need to use arbitrary text as a file path.
+`Path.without_escaping(text)` if you need to use arbitrary text as a file path.
## Path Methods