Merge branch 'mg/format-ref-doc-fix' into next