Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Change default style sheet: add line numbers

by LanX (Saint)
on Mar 28, 2015 at 19:33 UTC ( [id://1121678]=note: print w/replies, xml ) Need Help??


in reply to Change default style sheet: add line numbers

RFC! A two-column table design to separate numbers from code. :)

01 02 03 04 05 06 07 08 09 10
$obj = MyDyn->new(id => 'MyObj'); print $obj->id, "\n"; $obj->action(); package MyDyn; use base 'DynObject'; sub action { print "hi\n"; }

update
inspired by Re^5: Change default style sheet: add line numbers

Some remarks:

  • line-numbers are not always in sync, line-height of { or $ may interfere (depending on CSS, YMMV)
  • numbers shouldn't be real code section (no download-link) but mimic the css settings
  • JS toggle could interactively hide numbers
  • wrapped-over lines must not be counted
  • this could also be realized as nodelet hack
  • line numbers could be anchors for html-links generated from error message
  • line-numbers could be only shown on_mouse_over, else hidden

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1121678]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-26 02:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found