![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Code highlighting?by eric256 (Parson) |
on Oct 06, 2004 at 21:48 UTC ( #397172=note: print w/replies, xml ) | Need Help?? |
The problem is that this isn't something you can realy opt-out of. For instance if you post code, the server should realy do the HTML markup for highlighting then (no reason to do it over and over). If the next person doesn't want highlighting then they don't use the CSS to highlight it. However even though that person didn't want the highlighting the server still went to the work to implement the code highlighting HTML. As I type this I had an idea though. Why doesn't PerlMonks cache a node after formating all the links and formating? As far as I could tell now it reapplies links and formating everytime the node is displayed. Why not add a feild that is identical to the content but holds the already html formated output? When edits are done it presents the original post, and when submited saves the unformated AND formated copies? This could be a huge bonus even if it saves only microseconds per post. Just thinking out loud so try not to shoot me. Anyway I'm all for CSS based syntax highlighting if it can be in a way that doesn't add huge additional load. ___________ Eric Hodges
In Section
Perl Monks Discussion
|
|