Thread BBCode: Downloadlink für code-Tags (29 answers)
Opened by pq at 2011-01-09 21:43

pq
 2011-01-09 21:43
#144372 #144372
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
Es findet sich jetzt über jedem Code-block ein Downloadlink, der den enthaltenen Code als text/plain ausliefert.

Es funktioniert auch in more-Tags, obwohl das ein ziemliches gefrickel war...

Sollte eigentlich in jedem Browser funktionieren, obwohl ich mich daran erinnere, dass (zumindest in grauer Vorzeit) der IE gerne mal plaintext als html interpretiert hat...

Code: (dl )
1
2
3
4
5
6
7
8
#!/usr/bin/perl

use strict;
use warnings;
use Data::Dumper;

my $h = bless ['Hello'], 'World';
print Dumper $h;
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread BBCode: Downloadlink für code-Tags