I made some mods to the site so that new tags will be accepted in comments and wrote a simple perl script to markup code before posting. Now i want to test posting code to a story. So here is the code I use to markup code before posting:
#!/usr/bin/perl -w
print "<pre><code>
";
while (<>) {
s/&/&/g;
s/</</g;
s/>/>/g;
s///g;
print;
}
print "</pre></code>
";
Tags: Meta