-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Refactor renders #15175
Refactor renders #15175
Conversation
50f1c17
to
73da9aa
Compare
7407a70
to
d99a6f7
Compare
@@ -184,18 +185,26 @@ func actualRender(body []byte, urlPrefix string, metas map[string]string, wikiMa | |||
_ = lw.CloseWithError(fmt.Errorf("%v", err)) | |||
}() | |||
|
|||
pc := NewGiteaParseContext(urlPrefix, metas, wikiMarkdown) | |||
if err := converter.Convert(giteautil.NormalizeEOL(body), lw, parser.WithContext(pc)); err != nil { | |||
// FIXME: Don't read all to memory, but goldmark doesn't support |
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.
exist an upstream issue for this?
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.
I think yes, I cannot find any function to allow io.Reader
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.
30a8387
to
8c88a22
Compare
8c88a22
to
f071d17
Compare
7aa0736
to
4e0eda6
Compare
Codecov Report
@@ Coverage Diff @@
## master #15175 +/- ##
=========================================
Coverage ? 43.82%
=========================================
Files ? 678
Lines ? 81730
Branches ? 0
=========================================
Hits ? 35815
Misses ? 40082
Partials ? 5833
Continue to review full report at Codecov.
|
de6550f
to
deec308
Compare
|
Co-authored-by: zeripath <art27@cantab.net>
aec27fa
to
1eeb587
Compare
🚀 |
followup of go-gitea#15175
* Fix go-fuzz followup of #15175 * simplify * enhance
This PR refactor the
Render
system.Parser
toRenderer
because the previous name is confusingRender
function signature ofRenderer
to acceptinput io.Reader
andoutput io.Writer
and returnerror