element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.15k stars 1.99k forks source link

Text in code blocks is linkified #9613

Closed anoadragon453 closed 2 years ago

anoadragon453 commented 5 years ago

Description

Links that are part of a code block are linkified, which can make it hard to copy part of the text.

Example video: https://streamable.com/0rbfl

Steps to reproduce

While this might be nice for convenience, code blocks are supposed to not be processed in any way. Additionally, having things linkified can cause copying problems.

Log: not sent?

Version information

anoadragon453 commented 5 years ago

Though on the flip side it can be handy to click a link in a code block...

n1trux commented 4 years ago

this seems like an easy fix… can someone tell me where to patch it? Is there some code highlight JS doing this?

t3chguy commented 4 years ago

Perhaps something in https://github.com/matrix-org/matrix-react-sdk/blob/d820356990fc836bcdbfb65bc33d203f94f09e3a/src/linkify-matrix.js#L1-L0

ThiefMaster commented 3 years ago

Being able to click links starting with https:// is one thing. But linkifying the indico.modules.events (because .events is a valid TLD) in from indico.modules.events.registration.forms import RegistrationFormForm makes no sense whatsoever.

SuperSandro2000 commented 3 years ago

Same is happening for pkgs.ocamlPackages.shell in:

let
  pkgs = import <nixos-unstable> { };
in pkgs.ocamlPackages.buildDunePackage rec {
  pname = "comby";
  version = "1.5.1";
  useDune2 = true;
  minimumOcamlVersion = "4.11.0";

  src = pkgs.fetchFromGitHub {
    owner = "comby-tools";
    repo = pname;
    rev = version;
    sha256 = "1ipfrr6n1jyyryhm9zpn8wwgzfac1zgbjdjzrm00qcwc17r8x2hf";
  };
  buildInputs = [
    pkgs.zlib
    pkgs.pkg-config-unwrapped
    pkgs.ocamlPackages.ppx_deriving
    pkgs.ocamlPackages.ppx_deriving_yojson
    pkgs.ocamlPackages.ppx_sexp_conv
    pkgs.ocamlPackages.ppx_jane
    pkgs.ocamlPackages.ppx_expect
    pkgs.ocamlPackages.dune-configurator
    pkgs.ocamlPackages.lwt
    pkgs.ocamlPackages.parany
    pkgs.ocamlPackages.patience_diff
    pkgs.ocamlPackages.core
    pkgs.ocamlPackages.toml
    pkgs.ocamlPackages.shell
    pkgs.ocamlPackages.cohttp-lwt-unix
    pkgs.ocamlPackages.mparser
    pkgs.ocamlPackages.opium
    pkgs.ocamlPackages.textutils
    pkgs.ocamlPackages.jst-config
    pkgs.ocamlPackages.shell
  ];
  buildPhase = "dune build";
}