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

How to display characters :1: in Markdown documents #16060

Closed
a96219 opened this issue Jun 3, 2021 · 3 comments · Fixed by #16004
Closed

How to display characters :1: in Markdown documents #16060

a96219 opened this issue Jun 3, 2021 · 3 comments · Fixed by #16004
Labels

Comments

@a96219
Copy link

a96219 commented Jun 3, 2021

  • Gitea version (or commit ref): 1.15.0+dev-365-g36dce0e45 (docker)

In Markdown, the following characters

这是字符:1:

Show as follows:
image

How do I display 这是字符:1: correctly

@silverwind
Copy link
Member

silverwind commented Jun 7, 2021

This is a bug in the markdown processor. It should only replace text with images for the known emoji sequences.

@zeripath
Copy link
Contributor

The failure is here:

s := strings.Join(setting.UI.Reactions, " ") + "gitea"
if strings.Contains(s, alias) {

The use of strings.Contains(...) to check if the alias is known is incorrect.

			s := " " + strings.Join(setting.UI.Reactions, " ") + "gitea "
			if strings.Contains(s, " " + alias + " ") {

would fix this particular issue

@6543
Copy link
Member

6543 commented Jun 29, 2021

@zeripath #16004 does fix it too :D

6543 added a commit to 6543-forks/gitea that referenced this issue Jun 29, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants