diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/langs.md | 8 | ||||
| -rw-r--r-- | docs/paths.md | 2 |
2 files changed, 5 insertions, 5 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: $/"/ = """, $/'/ = "'", }) - 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]) diff --git a/docs/paths.md b/docs/paths.md index e39a42ce..6e8d6fc6 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.without_escaping(text)` if you need to use arbitrary text as a file path. +`Path.from_text(text)` if you need to use arbitrary text as a file path. ## Path Methods |
