aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/html_node.go
Commit message (Collapse)AuthorAgeFilesLines
* Improve img lazy loading (#34804)wxiaoguang2025-06-211-2/+8
| | | Related #32051 and #13526
* Fix footnote jump behavior on the issue page. (#34621)charles2025-06-091-0/+20
| | | | | | | | | | Close #34511 Close #34590 Add comment ID to the footnote item's id attribute to ensure uniqueness. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor markup render to fix various path problems (#34114)wxiaoguang2025-04-041-25/+62
| | | | | | | | | | | * 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-4/+2
| | | | | | | | | | 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-2/+2
| | | | This PR mainly moves some code and introduces `RenderContext.WithXxx` functions
* Fix and refactor markdown rendering (#32522)wxiaoguang2024-11-161-2/+2
|
* Refactor render system (#32492)wxiaoguang2024-11-141-2/+2
| | | | | | | | | | | | | | | | | | | 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
* Support relative paths to videos from Wiki pages (#31061)Sergey Sharybin2024-06-211-0/+62
This change fixes cases when a Wiki page refers to a video stored in the Wiki repository using relative path. It follows the similar case which has been already implemented for images. Test plan: - Create repository and Wiki page - Clone the Wiki repository - Add video to it, say `video.mp4` - Modify the markdown file to refer to the video using `<video src="video.mp4">` - Commit the Wiki page - Observe that the video is properly displayed --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>