0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 00:03:11 -05:00
forgejo/modules/markup
silverwind 23bd7b1211
Add copy button to markdown code blocks (#17638)
* Add copy button to markdown code blocks

Done mostly in JS because I think it's better not to try getting buttons
past the markup sanitizer.

* add svg module tests

* fix sanitizer regexp

* remove outdated comment

* vertically center button in issue comments as well

* add comment to css

* fix undefined on view file line copy

* combine animation less files

* Update modules/markup/markdown/markdown.go

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

* add test for different sizes

* add cloneNode and add tests for it

* use deep clone

* remove useless optional chaining

* remove the svg node cache

* unify clipboard copy string and i18n

* remove unused var

* remove unused localization

* minor css tweaks to the button

* comment tweak

* remove useless attribute

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2021-11-16 16:16:05 +08:00
..
common Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
csv Properly determine CSV delimiter (#17459) 2021-10-30 23:50:40 +08:00
external refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
markdown Add copy button to markdown code blocks (#17638) 2021-11-16 16:16:05 +08:00
mdstripper Fix various documentation, user-facing, and source comment typos (#16367) 2021-07-08 13:38:13 +02:00
orgmode Prevent panic in Org mode HighlightCodeBlock (#17140) 2021-09-24 14:29:32 +01:00
html.go Fix issue markdown bugs (#17411) 2021-10-23 21:38:12 +08:00
html_internal_test.go Fix issue markdown bugs (#17411) 2021-10-23 21:38:12 +08:00
html_test.go Fix NPE in fuzzer (#16680) 2021-08-13 00:22:05 +02:00
renderer.go cleanup code issueFullPattern in modules/markup (#16419) 2021-07-15 22:33:56 +02:00
renderer_test.go
sanitizer.go Add copy button to markdown code blocks (#17638) 2021-11-16 16:16:05 +08:00
sanitizer_test.go