Replace code blocks