Skip to content

Commit

Permalink
wordwrap() Add errors/changelog sections, specify U+0020 instead U+20 (
Browse files Browse the repository at this point in the history
…#3817)


---------

Co-authored-by: Gina Peter Banyard <[email protected]>
  • Loading branch information
mmalferov and Girgias authored Oct 3, 2024
1 parent ebc071c commit a6ee935
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions reference/strings/functions/wordwrap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<para>
Wraps a string to a given number of characters using a string break
character.
Strings wrap after a space (U+20) character unless <parameter>cut_long_words</parameter>
Strings wrap after a space (U+0020) character unless <parameter>cut_long_words</parameter>
is set to &true;.
</para>
</refsect1>
Expand Down Expand Up @@ -47,8 +47,8 @@
<term><parameter>break</parameter></term>
<listitem>
<para>
The line is broken using the optional
<parameter>break</parameter> parameter.
The line is broken using the optional <parameter>break</parameter> parameter.
It must not be an empty string.
</para>
</listitem>
</varlistentry>
Expand All @@ -75,6 +75,38 @@
</para>
</refsect1>

<refsect1 role="errors">
&reftitle.errors;
<simpara>
If <parameter>break</parameter> is an empty string,
a <classname>ValueError</classname> is thrown.
</simpara>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
If <parameter>break</parameter> is empty string,
a <classname>ValueError</classname> is thrown;
previously in this case it emitted an <constant>E_WARNING</constant> and returned &false;.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
Expand Down

0 comments on commit a6ee935

Please sign in to comment.