Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown may eat code blocks following a list #20324

Closed
HermannDppes opened this issue Jul 11, 2022 · 1 comment
Closed

Markdown may eat code blocks following a list #20324

HermannDppes opened this issue Jul 11, 2022 · 1 comment
Labels

Comments

@HermannDppes
Copy link

HermannDppes commented Jul 11, 2022

Description

When having a fenced code block in a Markdown file after an empty list item, the entire code block or parts of it may be ignored in the rendered Markdown view of Gitea as if the lines were not present within the Markdown file.

Completely vanishing code block

If no lines which are indented at least two spaces are present in the code block, it gets ignored in its entirety. As an example where you'll have to ignore the backslashes I inserted because I'm unable to stack Markdown properly, a file containing

*
\```
some code goes here
\```

would be rendered identically (as far as my eyes may discern) to a file having

*

as its only content.

Partially vanishing code block

If at least one line is indented at least two spaces, everything up to but not including the first of these lines is ignored. So the file with

*
\```
unindented code
 single space indented code
  double space indented code
unindented code
   triple space indented code
\```

renders just like

*
  double space indented code
unindented code
   triple space indented code
\```

would have rendered.

Tabs

I have not yet tested tabs because I noticed the issue just today and quickly went to the online editor to produce MWEs where tabs were not available to me. For all I know, a tab indentation may behave similarly to space indentation or completely differently.

Gitea Version

1.16.8

Can you reproduce the bug on the Gitea demo site?

No, since it wanted me to jump through some hoops to make an account there and I was in no mood to jump through any more hoops today. Maybe tomorrow.

Screenshots

grafik
grafik
grafik
grafik
grafik
grafik
grafik
grafik

Operating System

Debian 10 (Buster)

How are you running Gitea?

From a downloaded binary via systemd and behind a reverse proxy with Nginx.

Database

MySQL

@Gusted
Copy link
Contributor

Gusted commented Jul 12, 2022

Fixed in next release by, #20300

@Gusted Gusted closed this as completed Jul 12, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants