From 800e386105255c9c4faa9a7051b100a8768a70de Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 24 Sep 2024 13:26:49 -0400 Subject: Rename `from_unsafe_text` to `without_escaping` --- docs/langs.md | 4 ++-- docs/paths.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') 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: $/"/: """, $/'/: "'", }) - return HTML.from_unsafe_text(t) + return HTML.without_escaping(t) func paragraph(content:HTML)->HTML: return $HTML"

$content

" @@ -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 -- cgit v1.2.3