diff --git a/doc_src/string.txt b/doc_src/string.txt
index 02f4bd074..ed329f06a 100644
--- a/doc_src/string.txt
+++ b/doc_src/string.txt
@@ -261,10 +261,10 @@ foo2
42
>_ # Sort a list of elements which may contain newlines
->_ set foo beta alpha\ngamma
+>_ set foo beta alpha\\ngamma
>_ set foo (string join0 $foo | sort -z | string split0)
>_ string escape $foo[1]
-alpha\ngamma
+alpha\\ngamma
\endfish
\subsection string-example-replace-literal Replace Literal Examples