message: Don't apply `shorten-links` to links in code blocks
diff: @@ -5,19 +5,18 @@ import * as pageDetect from 'github-url-detection';
  import features from '.';
  import {linkifiedURLClass} from '../github-helpers/dom-formatters';
  +import {codeElementsSelectors} from './show-whitespace';
  function init(): void {
  observe(`a[href]:not(.${linkifiedURLClass})`, {
  constructor: HTMLAnchorElement,
  add(link) {
  - // Don't shorten links in code or code suggestions (but shorten them in review comments)
  - // Code explanation: Exclude links if the closest element found is not `.comment-body`
  + // Exclude the link if the closest element found is not `.comment-body`
  + // This avoids shortening links in code and code suggestions, but still shortens them in review comments
  // https://github.com/refined-github/refined-github/pull/4759#discussion_r702460890
  - if (link.closest('.blob-code, .comment-body, .js-suggested-changes-blob')?.matches('.blob-code, .js-suggested-changes-blob')) {
  - return;
  - }
  -
  + if (link.closest(`${codeElementsSelectors}, .comment-body`)?.classList.contains('comment-body')) {
  applyToLink(link, location.href);
  + }
  },
  });
  }
  