#compdef cmark

_arguments -s \
  '*:file:_files' \
  {--to,-t}'[Specify output format]:format:(html xml man commonmark latex)' \
  '--width[Specify wrap width (default 0 = nowrap)]' \
  '--sourcepos[Include source position attribute]' \
  '--hardbreaks[Treat newlines as hard line breaks]' \
  '--nobreaks[Render soft line breaks as spaces]' \
  '--safe[Omit raw HTML and dangerous URLs]' \
  '--unsafe[Render raw HTML and dangerous URLs]' \
  '--smart[Use smart punctuation]' \
  '--validate-utf8[Replace invalid UTF-8 sequences with U+FFFD]' \
  {--help,-h}'[Print usage information]' \
  '--version[Print version]'
