Commit Graph

8 Commits (master)

Author SHA1 Message Date
Peter Wu 4468ec1b15 Reduce line number bloat, fix hover effect
Currently line numbers look like (for blob view and sdiff respectively):

    <a class='no' id='n68' name='n68' href='#n68'>68</a>
    <td class='lineno'><a class='no' href='...#n1' id='n1' name='n1'>1</a></td>

name=".." is unnecessary if the id attribute is set (this even applies
to IE6), so drop it. (aside, in HTML5, the name attribute is gone.)

The line number links can be selected through their parent classes, no
need for another class "no", so drop it too.

For a file with 2000 lines, this yields a saving of 40% (29% gzipped).

While at it, fix the hover effect of line numbers: now the line number
get a black background as was intended.

Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
11 years ago
John Keeping c95cc5ec56 tests: use Git's test framework
This allows tests to run in parallel as well as letting us use "prove"
or another TAP harness to run the tests.

Git's test framework requires Git to be fully built before letting any
tests run, so add a new target to the top-level Makefile which builds
all of Git instead of just libgit.a and make the "test" target depend on
that.

Signed-off-by: John Keeping <john@keeping.me.uk>
11 years ago
John Keeping 392e07d28a tests: "grep -e" is not portable to all platforms
The "-e" option to grep is not needed unless specifying more than one
pattern, which we don't do.  Remove it to avoid restricting the tests on
platforms that do not have a grep that recognises "-e".

Signed-off-by: John Keeping <john@keeping.me.uk>
11 years ago
Onne Gorter a90e2aa4e1 changed objects are outputted, allowing for selections of code only 16 years ago
Lars Hjemli f3c99cf1ce ui-tree.c: do not add blank line when displaying blobs
Also, fix a related bug in the test-suite.

Noticed-by: Jim Meyering <jim@meyering.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli b575115d9d ui-shared.c: use html_url_arg()
The link-generating functions are updated to use the new html_url_arg
function, thereby fixing links to strange repos, branches and files.

Also, the test-suite is updated to verify some cases of strange urls.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli 2915483ef6 Fix html error detected by test-suite
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago
Lars Hjemli b4649fc905 Create initial testsuite
This creates a simple testsuite, heavily inspired by the testsuite in git.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
17 years ago