public function lineNumbers($lineSeparator, $source, $mark = null)
    {
        $count = count(explode($lineSeparator, $source));
        $tpl = '<span %s>%u</span>';

        $lines = [];
        for ($i = 0; $i < $count; $i++) {
            $lines[] = sprintf($tpl, '', $i + 1);
        }

        $lines[$mark - 1] = sprintf($tpl, 'id="mark"', $mark);

        return sprintf('<table><tr><td>%s</td><td>%s</td></tr></table>', implode($lineSeparator, $lines), $source);
    }