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

Whitespace trimming inside markdown inline tags inconsistent #23080

Closed
silverwind opened this issue Feb 22, 2023 · 1 comment · Fixed by #23093
Closed

Whitespace trimming inside markdown inline tags inconsistent #23080

silverwind opened this issue Feb 22, 2023 · 1 comment · Fixed by #23093
Labels
outdated/theme/markdown type/enhancement An improvement of existing functionality

Comments

@silverwind
Copy link
Member

silverwind commented Feb 22, 2023

Description

Given mardown source

x ` a` y
x `a ` y
x ` a ` y

Github renders:

Screenshot 2023-02-22 at 17 33 32

x a y
x a y
x a y

Gitea renders:

image

  • Line 1 should render the leading space inside the code element.
  • Line 2 could do with some whitespace after the code element.
  • It may be argued that whitespace should be visible within the code element on line 3.

Gitea Version

latest

Can you reproduce the bug on the Gitea demo site?

Yes

@silverwind silverwind added type/bug type/enhancement An improvement of existing functionality outdated/theme/markdown and removed type/bug labels Feb 22, 2023
@HesterG
Copy link
Contributor

HesterG commented Feb 23, 2023

Did an inspection on styles, looks like the difference between git and gitea is that gitea does not have this line:

white-space: break-spaces;

github:

截屏2023-02-23 15 22 22

gitea:

截屏2023-02-23 15 22 43

And if this rule is added, they will look the same.

gitea with the rule added:

截屏2023-02-23 15 33 14

lunny pushed a commit that referenced this issue Feb 23, 2023
…ode (#23093)

Given mardown source
```
x ` a` y
x `a ` y
x ` a ` y
```

Render

<img width="1421" alt="2023-02-23 15 33 14"
src="https://user-images.githubusercontent.com/17645053/220844280-a304c788-ac79-4a26-a55a-0db00f2fb3f3.png">

Fixes #23080.
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 24, 2023
yardenshoham pushed a commit to yardenshoham/gitea that referenced this issue Feb 24, 2023
zeripath pushed a commit that referenced this issue Feb 24, 2023
…ode (#23093) (#23120)

Backport #23093

Given mardown source
```
x ` a` y
x `a ` y
x ` a ` y
```

Render

<img width="1421" alt="2023-02-23 15 33 14"

src="https://user-images.githubusercontent.com/17645053/220844280-a304c788-ac79-4a26-a55a-0db00f2fb3f3.png">

Fixes #23080.

Co-authored-by: HesterG <hestergong@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@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
outdated/theme/markdown type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants