#1105035 cmark-gfm produces invalid roff for code blocks

Package:
cmark-gfm
Source:
cmark-gfm
Description:
CommonMark parsing and rendering program, GitHub flavor
Submitter:
Daniel Markstedt
Date:
2025-05-10 09:33:02 UTC
Severity:
normal
#1105035#5
Date:
2025-05-10 09:30:24 UTC
From:
To:
Severity: important

When transcoding commonmark / markdown to roff man pages with cmark-gfm, it will apply the "\f[C] \f[]" font style syntax to code blocks. This affects both four space indented code blocks, as well as backtick fenced code blocks.

However, the "C" font style isn't valid roff, and f.e. groff on Debian will throw: "warning: cannot select font 'C'"

A similar bug was recently fixed in pandoc. See discussion in https://savannah.gnu.org/bugs/index.php?64594

In comparison, pandoc is now using the ".EX .EE" macros to produce example code blocks.

The same bug exists in cmark (of which cmark-gfm is a fork) which is tracked at https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1094434