void main() { import std.stdio; immutable input = "Character,Speech\n" ~ "The multitude,The messiah! Show us the messiah!\n" ~ "Brians mother,Now you listen here! He's not the messiah; " ~ "he's a very naughty boy! Now go away!\n" ~ "The multitude,Who are you?\n" ~ "Brians mother,I'm his mother; that's who!\n" ~ "The multitude,Behold his mother! Behold his mother!"; "\n\n\n\n".write; "\n\n \n \n\n\n \n\n
".write; bool theadDone = false; foreach (immutable c; input) { switch(c) { case '\n': if (theadDone) { "
".write; } else { "
".write; theadDone = true; } break; case ',': "".write; break; case '<': "<".write; break; case '>': ">".write; break; case '&': "&".write; break; default: c.write; break; } } "
\n\n".write; }