-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Adding support for markdown in checks description #17980
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
Closed
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
a4bcb40
WIP: Add support for markdown in checks
Caellion 9f13a65
Merge branch 'main' of https://github.com/Caellion/gitea into main
Caellion 615028b
update private key to pass tests
Caellion 415175d
naming, markup class
Caellion 6b75d44
also use markdown-supporting statuses in pop-up
Caellion c9e754b
Update templates/repo/commit_statuses.tmpl
Caellion fcf972b
Update templates/repo/pulls/status.tmpl
Caellion c4fd589
Update web_src/less/_base.less
Caellion 358ba98
Merge https://github.com/go-gitea/gitea into upstream-master
Caellion aa587f5
Update templates/repo/commit_statuses.tmpl
Caellion d046160
Update templates/repo/pulls/status.tmpl
Caellion 8605af6
Update web_src/less/_base.less
Caellion fd082dc
Merge branch 'main' of https://github.com/Caellion/gitea
Caellion 3a0d6ef
Update modules/templates/helper.go
Caellion 46a2090
partial suggested changes
Caellion c37264d
it actually is log.Warn
Caellion fda6ca3
`template.HTML(html.EscapeString(raw))` instead of `template.HTML(mar…
Caellion 5e11356
Merge branch 'main' into main
Caellion ea7782a
Merge branch 'go-gitea:main' into main
Caellion 22461a2
Update helper.go
Caellion b1d817f
Update modules/templates/helper.go
Caellion fc75a26
Should be what @silverwind wanted, but I don't have working gofmt her…
Caellion 0624676
forgot to `save` before `commit`
Caellion 017a609
go please... these are comments, not code
Caellion 72b83ff
fixed comment again
Caellion aec7916
Merge branch 'main' into main
Caellion c1d1d4a
`markupType` instead of `Type`
Caellion fe29360
Merge branch 'main' of https://github.com/Caellion/gitea into main
Caellion 52124b7
it was meant to be `raw`
Caellion 7c401a3
but not that much `raw`
Caellion 252cfe2
ok, now i think i got that right, if error, then raw, else rendered
Caellion 585dfe5
Apply suggestions from code review
Caellion 671b457
Merge branch 'main' into main
Caellion 1905d60
Merge branch 'main' into main
Caellion f98f234
Merge branch 'main' into main
Caellion b4eec88
Merge branch 'go-gitea:main' into main
Caellion 47131ad
Merge branch 'go-gitea:main' into main
Caellion 182d358
gofumpt
Caellion 8adf230
Merge branch 'main' of https://github.com/go-gitea/gitea
Caellion 450ed1a
Merge branch 'main' into main
Caellion 5658b43
Merge branch 'go-gitea:main' into main
Caellion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has already included markdown rendering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it seems we just needs
markdown
here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was requested by sliverwind . #17980 (review)
Personally I also prefer to keep it simple and only introduce one render.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I guess we can actually simplify and only support markdown, at least until we can detect other types (like RST) based on entered content.
By the way, is there speaking anything against just using Str2html?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIR it didn't render markdown tables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah seems like
Str2html
is mislabeled and actually renders HTML strings into template.HMTL, somarkdown.RenderString
seems fine.