|
@@ 389-395 (lines=7) @@
|
| 386 |
|
|
| 387 |
|
// This line is too long, and lines *must* be split to a new tweet if they don't fit |
| 388 |
|
// into the current tweet. If this isn't the first line, record where we split the block. |
| 389 |
|
if ( $line_count > 0 ) { |
| 390 |
|
// Increment by 1 to allow for the \n between lines to be counted by ::get_boundary(). |
| 391 |
|
$current_character_count += strlen( $current_tweet['text'] ) + 1; |
| 392 |
|
$current_tweet['boundary'] = self::get_boundary( $block, $current_character_count ); |
| 393 |
|
|
| 394 |
|
self::save_current_tweet( $current_tweet ); |
| 395 |
|
} |
| 396 |
|
|
| 397 |
|
// Start a new tweet. |
| 398 |
|
$current_tweet = self::start_new_tweet(); |
|
@@ 440-445 (lines=6) @@
|
| 437 |
|
if ( $current_tweet['changed'] ) { |
| 438 |
|
// If we're already in the middle of a block, record the boundary |
| 439 |
|
// before creating a new tweet. |
| 440 |
|
if ( $line_count > 0 || $sentence_count > 0 ) { |
| 441 |
|
$current_character_count += strlen( $current_tweet['text'] ); |
| 442 |
|
$current_tweet['boundary'] = self::get_boundary( $block, $current_character_count ); |
| 443 |
|
|
| 444 |
|
self::save_current_tweet( $current_tweet ); |
| 445 |
|
} |
| 446 |
|
|
| 447 |
|
$current_tweet = self::start_new_tweet(); |
| 448 |
|
} |