in reply to Add line numbers to HTML
If you're putting line numbers at the start of each line of the HTML file, it's a Perl 1-liner kind of thing:
perl -pi.bak -e "$_ = qq/$.: $_/;"
But that will break HTML where tags span lines. And it will look pretty confusing when rendered in the browser since logical file newlines don't equate to browser-rendered newlines.
On the other hand, if you want every line rendered in the browser to display a line number, you've got a bit of a problem, as HTML output is generally formatted into paragraphs, not lines. Unless you're using <pre> tags, how are you going to determine where new lines begin in someone's browser? Regular HTML text auto-wraps in normal browsers.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Add line numbers to HTML
by Anonymous Monk on Mar 20, 2004 at 06:38 UTC | |
by davido (Cardinal) on Mar 20, 2004 at 06:44 UTC | |
by Anonymous Monk on Mar 20, 2004 at 06:48 UTC | |
by BUU (Prior) on Mar 20, 2004 at 07:25 UTC | |
by davido (Cardinal) on Mar 20, 2004 at 06:55 UTC |