Definition at line 1618 of file class.WordLevelDiff.php.
◆ __construct()
WordLevelDiff::__construct |
( |
|
$orig_lines, |
|
|
|
$closing_lines |
|
) |
| |
◆ _split()
WordLevelDiff::_split |
( |
|
$lines | ) |
|
Definition at line 1634 of file class.WordLevelDiff.php.
References array.
1637 $fname =
'WordLevelDiff::WordLevelDiff';
1640 list ($orig_words, $orig_stripped) = $this->
_split($orig_lines);
1641 list ($closing_words, $closing_stripped) = $this->
_split($closing_lines);
1643 parent::__construct($orig_words, $closing_words,
1644 $orig_stripped, $closing_stripped);
1648 function _split($lines) {
1649 $fname =
'WordLevelDiff::_split';
1653 $stripped =
array();
1655 foreach ( $lines as $line ) {
1656 # If the line is too long, just pretend the entire line is one big word 1657 # This prevents resource exhaustion problems 1664 if ( strlen( $line ) > self::MAX_LINE_LENGTH ) {
Create styles array
The data for the language used.
◆ closing()
WordLevelDiff::closing |
( |
| ) |
|
◆ orig()
Definition at line 1667 of file class.WordLevelDiff.php.
References array.
1669 if (preg_match_all(
'/ ( [^\S\n]+ | [0-9_A-Za-z\x80-\xff]+ | . ) (?: (?!< \n) [^\S\n])? /xs',
1672 $words = array_merge( $words, $m[0] );
1673 $stripped = array_merge( $stripped, $m[1] );
1678 return array($words, $stripped);
Create styles array
The data for the language used.
◆ MAX_LINE_LENGTH
const WordLevelDiff::MAX_LINE_LENGTH = 10000 |
The documentation for this class was generated from the following file: