Glad you found the problem
FYI .qmd is text file. You can insert code content directly
FAQ: How to Format R Markdown Source