extract code from scala form doc