#17 code lining up with line count

open
nobody
5
2005-08-06
2005-08-06
Anonymous
No

In middle.php line 97 should be changed from:

<pre><?=$src?></pre>

to:

<?=$src?>

This displays the code snippets much better as the line
count actually lines up with its corresponding line

here is an example of the change in action:

http://arienh.homeip.net/CSL/index.php?cat_select=MySQL&show=Reset_IDs

Discussion

  • Logged In: NO

    Sorry, forgot to leave email address:

    short_rz at internode dot on dot net

     
  • Logged In: NO

    line 90 and 91 should also be merged for the numbers to line
    up correctly

     
  • mathew
    mathew
    2005-12-24

    Logged In: YES
    user_id=1412373

    in order for javascript (or other files that do not have the
    automatic formatting) to also work, i did the following
    changes (starting at line 85):

    $src = '<code>'.str_replace("\n","\n<br />",
    $src).'</code>'; // added by mb
    }
    ?>
    <table>
    <tr>
    <td class="num" valign="top" align="right"><code>
    <?
    for($i=1; $i<=(substr_count($src,"<br />")+1); $i++) {
    echo "$i:<br />"; //by mb: deleted \n and added <br />
    }
    ?>
    </code></td>
    <td>
    <?=$src?>