Indefero

Indefero Commit Details


Date:2008-07-31 17:50:44 (16 years 8 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, newdiff, release-1.1, release-1.2, release-1.3, svn
Commit:7d806325579547facd27a0c44b54872fe9d7fb2d
Parents: 80ce87009e0249b7faf1143075bb4006bd2f8e35
Message:Added code indentation.

Changes:

File differences

src/IDF/Diff.php
113113
114114
115115
116
116
117
117118
118119
119120
......
124125
125126
126127
128
129
130
131
132
133
134
135
136
137
138
139
127140
128141
129142
                    } else {
                        $class = 'diff-a';
                    }
                    $out .= sprintf('<tr class="diff-line"><td class="diff-lc">%s</td><td class="diff-lc">%s</td><td class="%s mono">%s</td></tr>'."\n", $line[0], $line[1], $class, Pluf_esc($line[2]));
                    $line_content = $this->padLine(Pluf_esc($line[2]));
                    $out .= sprintf('<tr class="diff-line"><td class="diff-lc">%s</td><td class="diff-lc">%s</td><td class="%s mono">%s</td></tr>'."\n", $line[0], $line[1], $class, $line_content);
                }
                if (count($file['chunks']) > $cc)
                $out .= '<tr class="diff-next"><td>...</td><td>...</td><td>&nbsp;</td></tr>'."\n";
        return $out;
    }
    public function padLine($line)
    {
        $n = strlen($line);
        for ($i=0;$i<$n;$i++) {
            if (substr($line, $i, 1) != ' ') {
                break;
            }
        }
        return str_repeat('&nbsp;', $i).substr($line, $i);
    }
    /**
     * @return array array(array(start, n), array(start, n))
     */

Archive Download the corresponding diff file

Page rendered in 0.18831s using 13 queries.