If possible one day... e.g. if commonmark full loop possible, and something implemented for chunk options (currently in Commonmark XML the whole chunk header is "info" of a code block), then use xml2.
That said, if I used https://github.com/ropenscilabs/tinkr, we'd have to deal with losses whereas the current approach only changes the lines with chunk info.
If possible one day... e.g. if commonmark full loop possible, and something implemented for chunk options (currently in Commonmark XML the whole chunk header is "info" of a code block), then use xml2.
Cf the end of https://ropensci.org/technotes/2018/09/05/commonmark/