League\CommonMark\DocParser::preProcessInput PHP Method

preProcessInput() private method

private preProcessInput ( string $input ) : string[]
$input string
return string[]
    private function preProcessInput($input)
    {
        $lines = preg_split('/\\r\\n|\\n|\\r/', $input);
        // Remove any newline which appears at the very end of the string.
        // We've already split the document by newlines, so we can simply drop
        // any empty element which appears on the end.
        if (end($lines) === '') {
            array_pop($lines);
        }
        return $lines;
    }