summaryrefslogtreecommitdiffstats
path: root/web_src/js/markdown
Commit message (Collapse)AuthorAgeFilesLines
* Fix Anchor jumping with escaped query components (#14969) (#14977)zeripath2021-03-131-1/+1
| | | | | | | Backport #14969 Fix #14968 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Make SVG size argument optional (#12814)silverwind2020-09-111-1/+1
| | | | | Now defaults to 16 on both frontend and backend. Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add loading spinners and mermaid error handling (#12358)silverwind2020-08-042-12/+45
| | | | | - Add loading spinners on editor and mermaid renderers - Add error handling and inline error box for mermaid - Fix Mermaid rendering by using the .init api
* Add mermaid JS renderer (#12334)silverwind2020-07-272-0/+28
| | | | | | | | | | | | | | | | | | | * Add mermaid JS renderer For feature parity with GitLab. Tested in files, issues, wiki, editor. arc-green only does an inversion because the renderer seems to like to render white backgrounds on boxes. Ref: https://github.com/go-gitea/gitea/issues/3340 Fixes: https://github.com/go-gitea/gitea/issues/12307 * add feature entry, switch to neutral theme, remove border * add bindFunctions support * remove unnecessary border-radius Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Direct SVG rendering (#12157)silverwind2020-07-121-1/+1
| | | | | | | | | | | | Introduce 'make svg' which calls a node script that compiles svg files to `public/img/svg`. These files are vendored to not create a dependency on Node for the backend build. On the frontend side, configure webpack using `raw-loader` so SVGs can be imported as string. Also moved our existing SVGs to web_src/svg for consistency. Fixes: https://github.com/go-gitea/gitea/issues/11618
* Shorten markdown heading anchors links (#11903)silverwind2020-06-261-0/+32
This changes the links on headings like '# Usage' in markdown from `https://host/user/repo#user-content-usage` to just `https://host/user/repo#usage` matching GitHub and GitLab. The linked id elements still have the prefix and this behaviour matches GitHub and GitLab too, so JS is needed to scroll to the active anchor. I suspect it's like that to avoid namespace collission between user-generated content and other page content. Compatibilty for old links is included so they will continue to work. Also included are some enhancements to make the clickable area for the link icon larger and fix its color on arc-green. Fixes: https://github.com/go-gitea/gitea/issues/11896 Fixes: https://github.com/go-gitea/gitea/issues/12062