Note that this can be reproduced with the WYSIWYG editor and breaks the WYSIWYG experience there, if you enter
{{/code}}
as the content of the code macro in the WYSIWYG editor, it is first displayed just fine but it breaks once you save the document.