Skip to content

Commit

Permalink
misc: Apply reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 committed Dec 24, 2024
1 parent 647a432 commit c979ae1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/std/text.ab
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ pub fun replace(source, search, replace) {
trust $ {nameof search}="\$\{{nameof search}//\\\\/\\\\\\\}" $
if bash_version() >= 502 {
trust $ {nameof replace}="\$\{{nameof replace}//\\\\/\\\\\\\\}" $
} else {
trust $ {nameof replace}="\$\{{nameof replace}//\\\\/\\\\}" $
}

return trust $ echo "\$\{{nameof source}//{search}/{replace}}" $
}

Expand Down
1 change: 1 addition & 0 deletions src/tests/stdlib/text_replace.ab
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * from "std/text"
// mono
// di
// tri

main {
echo replace("one one one", "one", "TWO")
echo replace("a\\b\\c\\d", "\\", "\\\\")
Expand Down

0 comments on commit c979ae1

Please sign in to comment.