gogs / gogs/gogs

Markdown rendering unordered item lists not properly

Open
#3,376 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💊 bug
Dominant language
Go
Stars
47.8k
Forks
5.1k
Avg merge
7h 23m
Merged PRs (30d)
5

Description

Description

Markdown is not properly rendered in HTML: when opening an unordered list, the closing tag </ul> will be closed to far, thus indenting the rest of the document (padding-left: 2em; from the CSS).
It should be closed as soon enumaring the items (<li>) is finished.

(See POC provided via try.gogs.io)

See attached the same markdown code with proper rendering (by dilinger):
dilinger_md

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction at https://try.gogs.io/gelim/markdown-bug and compare its unordered-list HTML with the attached properly rendered example. Trace the Markdown rendering entry point responsible for closing the

    element. Done means list items are closed correctly, the
appears at the right nesting level, and the remaining document is no longer indented.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, go, html, markdown
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.