Fix various legacy problems (#37092)

1.  Fix #36439
2. Fix #37089
3. Fix incorrect layout of admin auth oidc page
4. Fix #35866
5. Fix #35800
6. Fix #36243
This commit is contained in:
wxiaoguang
2026-04-03 20:19:04 +08:00
committed by GitHub
parent 30c07c20e9
commit 74060bb849
18 changed files with 132 additions and 76 deletions
+24 -9
View File
@@ -429,9 +429,12 @@ test
---
test
`,
`- item1
- item2
`<hr/>
<ul>
<li>item1</li>
<li>item2</li>
</ul>
<hr/>
<p>test</p>
`,
},
@@ -443,8 +446,8 @@ anything
---
test
`,
`anything
`<hr/>
<h2>anything</h2>
<p>test</p>
`,
},
@@ -471,14 +474,26 @@ foo: bar
</details><ul>
<li class="task-list-item"><input type="checkbox" disabled="" data-source-position="19"/>task 1</li>
</ul>
`,
},
// we have our own frontmatter parser, don't need to use github.com/yuin/goldmark-meta
{
"InvalidFrontmatter",
`---
foo
`,
`<hr/>
<p>foo</p>
`,
},
}
for _, test := range testcases {
res, err := markdown.RenderString(markup.NewTestRenderContext(), test.input)
assert.NoError(t, err, "Unexpected error in testcase: %q", test.name)
assert.Equal(t, test.expected, string(res), "Unexpected result in testcase %q", test.name)
for _, tt := range testcases {
t.Run(tt.name, func(t *testing.T) {
res, err := markdown.RenderString(markup.NewTestRenderContext(), tt.input)
assert.NoError(t, err, "Unexpected error in testcase: %q", tt.name)
assert.Equal(t, tt.expected, string(res), "Unexpected result in testcase %q", tt.name)
})
}
}