aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/markdown/transform_image.go
Commit message (Collapse)AuthorAgeFilesLines
* Refactor markup render to fix various path problems (#34114)wxiaoguang2025-04-041-59/+0
| | | | | | | | | | | * Fix #33972 * Use consistent path resolving for links and medias. * No need to make the markup renders to resolve the paths, instead, the paths are all correctly resolved in the "post process" step. * Fix #33274 * Since 1.23, all paths starting with "/" are relative to current render context (for example: the current repo branch) * Introduce `/:root/path-relative-to-root`, then the path will be rendered as relative to "ROOT_URL"
* Refactor markup render system (#32612)wxiaoguang2024-11-241-7/+1
| | | | | | | | | | This PR removes (almost) all path tricks, and introduces "renderhelper" package. Now we can clearly see the rendering behaviors for comment/file/wiki, more details are in "renderhelper" tests. Fix #31411 , fix #18592, fix #25632 and maybe more problems. (ps: fix #32608 by the way)
* Refactor markup render system (#32589)wxiaoguang2024-11-221-1/+1
| | | | This PR mainly moves some code and introduces `RenderContext.WithXxx` functions
* Fix and refactor markdown rendering (#32522)wxiaoguang2024-11-161-1/+1
|
* Refactor render system (#32492)wxiaoguang2024-11-141-1/+1
| | | | | | | | | | | | | | | | | | | There were too many patches to the Render system, it's really difficult to make further improvements. This PR clears the legacy problems and fix TODOs. 1. Rename `RenderContext.Type` to `RenderContext.MarkupType` to clarify its usage. 2. Use `ContentMode` to replace `meta["mode"]` and `IsWiki`, to clarify the rendering behaviors. 3. Use "wiki" mode instead of "mode=gfm + wiki=true" 4. Merge `renderByType` and `renderByFile` 5. Add more comments ---- The problem of "mode=document": in many cases it is not set, so many non-comment places use comment's hard line break incorrectly
* Resolve lint for unused parameter and unnecessary type arguments (#30750)Chongyi Zheng2024-04-291-2/+1
| | | | | | | | | | Resolve all cases for `unused parameter` and `unnecessary type arguments` Related: #30729 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Refactor markdown render (#30139)wxiaoguang2024-03-281-0/+66
Only split the file into small ones (and rename AttentionTypes to attentionTypes)