Skip to content

Don't show 'Copy content' button on text files that are not rendered as text

Douwe Maan requested to merge dm-remove-copy-link-on-svgs into master

Bug introduced in !9878 (merged).

The "Copy content" button reads the content to copy from the DOM, and can only do that when the actual blob/_text partial is displayed, and not if the textfile is rendered as, say, SVG or Markdown.

The large amount of changes was "necessary" to make sure Blob#to_partial_path actually only returns text when it's actually going to render as text.

Merge request reports