You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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>
3 years ago
..
chroma Improve Light Chroma style (#15699) 3 years ago
code Fix and restyle menu on code line (#15913) 3 years ago
features Add copy button to markdown code blocks (#17638) 3 years ago
markup Add copy button to markdown code blocks (#17638) 3 years ago
shared Issue list alignment tweaks (#15483) 3 years ago
standalone Fix tooltips and issue dependency styles (#13458) 4 years ago
themes Prevent NPE in CSV diff rendering when column removed (#17018) 3 years ago
_admin.less Fix webhook list styling (#14001) 4 years ago
_base.less Tune UI alignment for nav bar notification icon, avatar image, issue label (#17438) 3 years ago
_dashboard.less Fix overflow label in mobile view (#17020) 3 years ago
_editor.less Issue sidebar and misc css fixes (#15524) 3 years ago
_explore.less Ensure popup text is aligned left (#17327) 3 years ago
_font_i18n.less Fix CJK fonts again and misc. font issues (#14575) 3 years ago
_form.less Migrating wiki don't require token, so we should move it out of the require form (#17645) 3 years ago
_home.less fix media query edge case (#13546) 4 years ago
_install.less Reindent Less to 2-space (#12602) 4 years ago
_organization.less Fix margin between avatars on org pages (#15194) 3 years ago
_repository.less Move merge-section to `> .content` (#17582) 3 years ago
_review.less fix: code review comments on mobile (#17321) 3 years ago
_svg.less Reindent Less to 2-space (#12602) 4 years ago
_tribute.less Update JS dependencies (#15033) 3 years ago
_user.less Remove remaining fontawesome usage in templates (#15952) 3 years ago
animations.less Add copy button to markdown code blocks (#17638) 3 years ago
helpers.less Fix various documentation, user-facing, and source comment typos (#16367) 3 years ago
index.less Add copy button to markdown code blocks (#17638) 3 years ago
misc.css Raw file view tweaks (#15520) 3 years ago
variables.less fix media query edge case (#13546) 4 years ago