Skip to content

deno fmt breaks "definition lists" in markdown #36874

Description

@berkes

Version: deno 2.9.6 (stable, release, x86_64-unknown-linux-gnu)

Running deno fmt on a file with a markdown definition list, reformats the lists so they no longer are treated as definition lists. It removes the necessary newlines.

Possibily related to #30416

Input

Term
: Definition content

Markdown
: A lightweight markup language
: Created by John Gruber in 2004

HTML
: A standard markup language used to create web pages
: Used to create web pages

Expected output:

As above, so unchanged.

Actual output:

Term : Definition content

Markdown : A lightweight markup language : Created by John Gruber in 2004

HTML : A standard markup language used to create web pages : Used to create web
pages

This then will no longer be rendered as a definition list. Definition lists, albeit a little used Markdown feature](https://www.markdownguide.org/extended-syntax/#definition-lists), are very useful in documentation for e.g. glossary.md, documentation of settings, parameters etc. Github doesn't render such lists as DLs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions