summaryrefslogtreecommitdiffstats
path: root/modules/markup/renderer.go
Commit message (Collapse)AuthorAgeFilesLines
* Support ignore all santize for external renderer (#18984)Lunny Xiao2022-03-061-12/+26
| | | | | | | | | | | | | | * Support ignore all santize for external renderer * Update docs * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> * Fix doc Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: 6543 <6543@obermui.de>
* Prevent double sanitize (#16386)KN4CK3R2021-11-191-2/+1
| | | | | | | | * Prevent double sanitize. * Use SanitizeReaderToWriter. At the moment `actualRender` uses `SanitizeReader` to sanitize the output. But `SanitizeReader` gets called in `markup.render` too so the output gets sanitized twice. I moved the `SanitizeReader` call into `RenderRaw` because this method does not use `markup.render`. I would like to remove the `RenderRaw`/`RenderRawString` methods too because they are only called from tests, the fuzzer and the `/markup/raw` api endpoint. This endpoint is not in use so I think we could remove them. If we really in the future need a method to render markdown without PostProcessing we could achieve this with a more flexible `renderer.NeedPostProcess` method.
* cleanup code `issueFullPattern` in modules/markup (#16419)Josef Fröhle2021-07-151-1/+0
| | | fix #16415
* Add sanitizer rules per renderer (#16110)KN4CK3R2021-06-231-30/+26
| | | | | | | * Added sanitizer rules per renderer. * Updated documentation. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* More efficiently parse shas for shaPostProcessor (#16101)zeripath2021-06-211-7/+39
| | | | | | | | | | | | | | | | * More efficiently parse shas for shaPostProcessor The shaPostProcessor currently repeatedly calls git rev-parse --verify on both backends which is fine if there is only one thing that matches a sha - however if there are multiple things then this becomes wildly inefficient. This PR provides functions for both backends which are much faster to use. Fix #16092 * Add ShaExistCache to RenderContext Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Fix regression of renderer (#16091)Lunny Xiao2021-06-061-24/+34
| | | | | * Fix regression of renderer * Fix render setting load twice bug
* Refactor renders (#15175)Lunny Xiao2021-04-191-0/+201
* Refactor renders * Some performance optimization * Fix comment * Transform reader * Fix csv test * Fix test * Fix tests * Improve optimaziation * Fix test * Fix test * Detect file encoding with reader * Improve optimaziation * reduce memory usage * improve code * fix build * Fix test * Fix for go1.15 * Fix render * Fix comment * Fix lint * Fix test * Don't use NormalEOF when unnecessary * revert change on util.go * Apply suggestions from code review Co-authored-by: zeripath <art27@cantab.net> * rename function * Take NormalEOF back Co-authored-by: zeripath <art27@cantab.net>