Monorepo for Tangled tangled.org

appview/pages: multiline PR comment links #1170

merged opened by oyster.cafe targeting master from lt/appview-pages-multiline-pr-comment-links
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:3fwecdnvtcscjnrx2p4n7alz/sh.tangled.repo.pull/3mh6hcv6b5u22
+13 -2
Interdiff #0 โ†’ #1
+13 -2
appview/pages/templates/fragments/line-quote-button.html
··· 71 71 if (!hash) return; 72 72 const parts = hash.split('~'); 73 73 const startEl = document.getElementById(parts[0]); 74 - if (!startEl) return; 74 + 75 + if (!startEl) { 76 + const params = new URLSearchParams(window.location.search); 77 + const hasCombined = parts.some(p => /-O\d+-N\d+$/.test(p)); 78 + if (hasCombined && params.get('diff') !== 'unified') { 79 + params.set('diff', 'unified'); 80 + window.location.replace( 81 + `${window.location.pathname}?${params}${window.location.hash}` 82 + ); 83 + } 84 + return; 85 + } 75 86 76 87 const endEl = parts.length === 2 ? document.getElementById(parts[1]) : startEl; 77 88 if (!endEl) return; ··· 197 208 ? firstAnchor 198 209 : `${firstAnchor}~${lastAnchor}`; 199 210 200 - const md = `[\`${label}\`](${window.location.pathname}#${fragment})`; 211 + const md = `[\`${label}\`](${window.location.pathname}${window.location.search}#${fragment})`; 201 212 202 213 const { selectionStart: s, selectionEnd: end, value } = ta; 203 214 const before = value.slice(0, s);
input.css

This file has not been changed.

History

2 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
appview/pages: multiline PR comment links
3/3 success
expand
expand 0 comments
pull request successfully merged
1 commit
expand
appview/pages: multiline PR comment links
3/3 success
expand
expand 0 comments