Explicit CommonMark support (with documented deviations) #1814

Closed
opened 2025-11-02 04:14:06 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @lofidevops on GitHub (May 23, 2018).

  • Gitea version (or commit ref): Any
  • Git version: N/A
  • Operating system: Any
  • Database (use [x]):
    • Any
  • Can you reproduce the bug at https://try.gitea.io:
    • Not relevant
  • Log gist: N/A

To support interoperability with other software (e.g. text editors), Gitea should explicitly support the CommonMark standard, and document any deviations from/extensions to the standard.

Depends on:

Originally created by @lofidevops on GitHub (May 23, 2018). - Gitea version (or commit ref): Any - Git version: N/A - Operating system: Any - Database (use `[x]`): - [x] Any - Can you reproduce the bug at https://try.gitea.io: - [x] Not relevant - Log gist: N/A To support interoperability with other software (e.g. text editors), Gitea should explicitly support the CommonMark standard, and document any deviations from/extensions to the standard. Depends on: * https://github.com/russross/blackfriday/issues/114
Author
Owner

@tankerkiller125 commented on GitHub (May 30, 2018):

So far from what I can tell the deviations from CommonMark are basically the same ones the Github has. Notably, table support, automatic link detection without the <> @mentions support #ticketid support. Honestly, no service supports CommonMark to the exact spec. The CommonMark spec is extremely limiting in scope and some things have been made standard by Github or other services and everyone agrees that its the way its done even though its not in the spec. Tables is an excellent example of something that is not in the spec but everyone has agreed on a standard for.

@tankerkiller125 commented on GitHub (May 30, 2018): So far from what I can tell the deviations from CommonMark are basically the same ones the Github has. Notably, table support, automatic link detection without the `<>` @mentions support #ticketid support. Honestly, no service supports CommonMark to the exact spec. The CommonMark spec is extremely limiting in scope and some things have been made standard by Github or other services and everyone agrees that its the way its done even though its not in the spec. Tables is an excellent example of something that is not in the spec but everyone has agreed on a standard for.
Author
Owner

@guybrush commented on GitHub (Jun 25, 2018):

GFM is a strict superset of CommonMark.

try this on gitea and on github:

* a
  * b
    * c
  • on github the indentation of c will be 3
  • on gitea the indentation of c will be 2 (same as b)

this is only one issue, but for me the most annoying one

@guybrush commented on GitHub (Jun 25, 2018): *GFM is a strict superset of CommonMark.* * https://github.github.com/gfm (see green highlighted topics for extensions) * https://githubengineering.com/a-formal-spec-for-github-markdown try this on gitea and on github: ``` * a * b * c ``` * on github the indentation of **c** will be 3 * on gitea the indentation of **c** will be 2 (same as **b**) this is only one issue, but for me the most annoying one
Author
Owner

@westurner commented on GitHub (Mar 3, 2019):

#### GitLab, Gitea
This has two trailing spaces..  
And so there's a newline/br here.

But here
there's no trailing space so there's no newline; just a space (' ')

#### GitHub
This lacks two trailing spaces
But GitHub still makes a newline/br

GitLab, Gitea

This has two trailing spaces..
And so there's a newline/br

GitHub

This lacks two trailing spaces
But GitHub still makes a newline/br

@westurner commented on GitHub (Mar 3, 2019): ```markdown #### GitLab, Gitea This has two trailing spaces.. And so there's a newline/br here. But here there's no trailing space so there's no newline; just a space (' ') #### GitHub This lacks two trailing spaces But GitHub still makes a newline/br ``` #### GitLab, Gitea This has two trailing spaces.. And so there's a newline/br #### GitHub This lacks two trailing spaces But GitHub still makes a newline/br
Author
Owner

@lafriks commented on GitHub (Dec 31, 2019):

Please reopen if still not fixed

@lafriks commented on GitHub (Dec 31, 2019): Please reopen if still not fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1814