From 37b54b4deaae3e9818fb9b25a9224165139f951e Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Sun, 4 Feb 2024 11:26:43 -0800 Subject: [PATCH] Note that line boundaries also result in breaks --- src/vesta/chars.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vesta/chars.py b/src/vesta/chars.py index f424617..9425f0b 100644 --- a/src/vesta/chars.py +++ b/src/vesta/chars.py @@ -190,6 +190,9 @@ def encode_text( cannot be found, the line will be broken at the column limit (potentially mid-"word"). + Line boundaries (as determined by :py:meth:`str.splitlines`) appearing in + the source string always result in line breaks. + :raises ValueError: if the string contains unsupported characters or codes >>> encode_text('multiple\\nlines\\nof\\ntext', align="center", valign="middle")