Mercurial > hg > rc2
comparison program/lib/Roundcube/rcube_text2html.php @ 19:b6a96bdd6b29
More cleaning up php8 Warnings/deprecations
| author | Charlie Root |
|---|---|
| date | Wed, 08 Oct 2025 08:50:44 -0400 |
| parents | 4681f974d28b |
| children | 303b85d5b561 |
comparison
equal
deleted
inserted
replaced
| 18:b631c1c7a3ce | 19:b6a96bdd6b29 |
|---|---|
| 64 // prefix and suffix of unwrappable line | 64 // prefix and suffix of unwrappable line |
| 65 'nobr_start' => '<span style="white-space:nowrap">', | 65 'nobr_start' => '<span style="white-space:nowrap">', |
| 66 'nobr_end' => '</span>', | 66 'nobr_end' => '</span>', |
| 67 ); | 67 ); |
| 68 | 68 |
| 69 /** | |
| 70 * Indicates whether content in the $text variable has been converted yet. | |
| 71 * | |
| 72 * @var boolean $_converted | |
| 73 * @see $html, $text | |
| 74 */ | |
| 75 protected $_converted = false; | |
| 69 | 76 |
| 70 /** | 77 /** |
| 71 * Constructor. | 78 * Constructor. |
| 72 * | 79 * |
| 73 * If the plain text source string (or file) is supplied, the class | 80 * If the plain text source string (or file) is supplied, the class |
| 172 if ($this->config['flowed'] && ord($text[$n][0]) == $flowed_char) { | 179 if ($this->config['flowed'] && ord($text[$n][0]) == $flowed_char) { |
| 173 $flowed = true; | 180 $flowed = true; |
| 174 $text[$n] = substr($text[$n], 1); | 181 $text[$n] = substr($text[$n], 1); |
| 175 } | 182 } |
| 176 | 183 |
| 177 if ($text[$n][0] == '>' && preg_match('/^(>+ {0,1})+/', $text[$n], $regs)) { | 184 if ($text[$n] && $text[$n][0] == '>' && preg_match('/^(>+ {0,1})+/', $text[$n], $regs)) { |
| 178 $q = substr_count($regs[0], '>'); | 185 $q = substr_count($regs[0], '>'); |
| 179 $text[$n] = substr($text[$n], strlen($regs[0])); | 186 $text[$n] = substr($text[$n], strlen($regs[0])); |
| 180 $text[$n] = $this->_convert_line($text[$n], $flowed || $this->config['wrap']); | 187 $text[$n] = $this->_convert_line($text[$n], $flowed || $this->config['wrap']); |
| 181 $_length = strlen(str_replace(' ', '', $text[$n])); | 188 $_length = strlen(str_replace(' ', '', $text[$n])); |
| 182 | 189 |
