Cut out any template file extensions when inlining