extra style for line numbers

Fri, 24 May 2013 13:53:52 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 24 May 2013 13:53:52 +0200
changeset 2
3bced1fe9193
parent 1
12c482ea4fc4
child 3
b7a6d546bd1d

extra style for line numbers

src/c2html.c file | annotate | diff | comparison | revisions
test/header.htm file | annotate | diff | comparison | revisions
     1.1 --- a/src/c2html.c	Fri May 24 13:35:06 2013 +0200
     1.2 +++ b/src/c2html.c	Fri May 24 13:53:52 2013 +0200
     1.3 @@ -133,8 +133,8 @@
     1.4      if (inputfile) {
     1.5        printf("<pre>\n");
     1.6        for (int i = 0 ; i < inputfile->count ; i++) {
     1.7 -        printf("%*d: %s\n", lnw(inputfile->count),
     1.8 -            i, inputfile->lines[i]);
     1.9 +        printf("<span class=\"c2html-lineno\">%*d:</span> %s\n",
    1.10 +            lnw(inputfile->count), i, inputfile->lines[i]);
    1.11        }
    1.12        printf("</pre>\n");
    1.13        freeinputfilebuffer(inputfile);
     2.1 --- a/test/header.htm	Fri May 24 13:35:06 2013 +0200
     2.2 +++ b/test/header.htm	Fri May 24 13:53:52 2013 +0200
     2.3 @@ -2,6 +2,12 @@
     2.4  <html>
     2.5    <head>
     2.6      <title>c2html</title>
     2.7 +    <style type="text/css">
     2.8 +      span.c2html-lineno {
     2.9 +        font-style: italic;
    2.10 +        color: grey;
    2.11 +      }
    2.12 +    </style>
    2.13    </head>
    2.14    <body>
    2.15  

mercurial