Skip to content

[proposal] suggest render repo description by markdown language #13412

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

Closed
wants to merge 1 commit into from

Conversation

a1012112796
Copy link
Member

mark it as a draft because I'm not sure it's necessay, it's just a proposal, waiting more responses, thanks.

@codecov-io
Copy link

Codecov Report

Merging #13412 into master will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13412      +/-   ##
==========================================
- Coverage   42.11%   42.09%   -0.03%     
==========================================
  Files         691      691              
  Lines       76003    75999       -4     
==========================================
- Hits        32010    31993      -17     
- Misses      38744    38759      +15     
+ Partials     5249     5247       -2     
Impacted Files Coverage Δ
models/repo.go 56.33% <100.00%> (+0.09%) ⬆️
modules/markup/html.go 75.67% <0.00%> (-2.69%) ⬇️
modules/queue/workerpool.go 58.77% <0.00%> (-1.23%) ⬇️
routers/repo/view.go 37.47% <0.00%> (-0.65%) ⬇️
services/pull/pull.go 40.78% <0.00%> (-0.50%) ⬇️
modules/queue/unique_queue_disk_channel.go 55.38% <0.00%> (+1.53%) ⬆️
modules/charset/charset.go 73.03% <0.00%> (+4.49%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa8492f...af84b0e. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 3, 2020
}
return template.HTML(markup.Sanitize(string(desc)))
func (repo *Repository) DescriptionHTML() string {
return string(markdown.Render([]byte(repo.Description), repo.HTMLURL(), repo.ComposeMetas()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think markup.RenderDescriptionHTML has done that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's a little different with markdown.
example:
image

I wander why design this special ruler to render it.

@silverwind
Copy link
Member

silverwind commented Nov 6, 2020

I think I'm fine with allowing single-line markdown-rendered content there but I'm not sure if we want to allow multi-line stuff, as that could destroy our layout.

@mrsdizzie
Copy link
Member

mrsdizzie commented Nov 6, 2020

PR that implemented the current version seems suspiciously specific yet no details in the PR itself -- @zeripath does this need to be done a particular way for security or other concern? #6306

@lunny
Copy link
Member

lunny commented Nov 7, 2020

I think since only one line allowed currently, the requirement for the description to render as markdown is little.

@a1012112796 a1012112796 deleted the suggest_use_md branch November 12, 2020 15:54
@go-gitea go-gitea locked and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants