Fix issue title rendering and refactor legacy function names (#32703)
Fix #32700, regression of recent markup refactoring And by the way, clarify many legacy problems: 1. Some "RenderXxx" functions do not really "render", they only call "post processors" 2. Merge "RenderEmoji | RenderCodeBlock", they are all for "simple issue title"
This commit is contained in:
parent
171edfc793
commit
2f43536c3e
14 changed files with 73 additions and 57 deletions
|
@ -252,7 +252,7 @@ func TestRender_IssueIndexPattern_NoShortPattern(t *testing.T) {
|
|||
testRenderIssueIndexPattern(t, "!1", "!1", NewTestRenderContext(metas))
|
||||
}
|
||||
|
||||
func TestRender_RenderIssueTitle(t *testing.T) {
|
||||
func TestRender_PostProcessIssueTitle(t *testing.T) {
|
||||
setting.AppURL = TestAppURL
|
||||
metas := map[string]string{
|
||||
"format": "https://someurl.com/{user}/{repo}/{index}",
|
||||
|
@ -260,7 +260,7 @@ func TestRender_RenderIssueTitle(t *testing.T) {
|
|||
"repo": "someRepo",
|
||||
"style": IssueNameStyleNumeric,
|
||||
}
|
||||
actual, err := RenderIssueTitle(NewTestRenderContext(metas), "#1")
|
||||
actual, err := PostProcessIssueTitle(NewTestRenderContext(metas), "#1")
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "#1", actual)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue