How can I insert code snippets in a post? Currently inserting

L = thisComp.layer("ghost.ai");
P1 = L.position - position;
P2 = toWorldVec([0,0,1]);
dot(P1,P2);

results in just one long line of code with the tags showing.

Thanks very much for any help.