]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): handle newlines in base64 string encode example
authorzeertzjq <zeertzjq@outlook.com>
Thu, 17 Jul 2025 18:30:55 +0000 (20:30 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 17 Jul 2025 18:30:55 +0000 (20:30 +0200)
closes: #17777

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/builtin.txt

index 5e395e6d708f0d2196c9d01d0e24876bdeacf890..e1847b1d3b5874d7065bcf6eddff854c825a431b 100644 (file)
@@ -1,4 +1,4 @@
-*builtin.txt*  For Vim version 9.1.  Last change: 2025 Jul 14
+*builtin.txt*  For Vim version 9.1.  Last change: 2025 Jul 17
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1268,7 +1268,7 @@ base64_encode({blob})                                     *base64_encode()*
                    " Encode the contents of a binary file
                    echo base64_encode(readblob('somefile.bin'))
                    " Encode a string
-                   echo base64_encode(str2blob([somestr]))
+                   echo base64_encode(str2blob(somestr->split("\n")))
 <
                Can also be used as a |method|: >
                        GetBinaryData()->base64_encode()