Skip to content

Keep a Korean particle after a URL's closing mark out of the terminal link - #687

Merged
yansfil merged 1 commit into
mainfrom
fix/terminal-url-korean-particle
Oct 7, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/terminal-url-korean-particle

Conversation

@yansfil

@yansfil yansfil commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Summary

터미널에서 PR #682 (https://github.com/o/r/pull/682)이 끝났습니다처럼 URL 뒤에 닫는 괄호와 한국어 조사가 붙으면, 마우스를 올렸을 때 )이까지 링크로 잡혀 클릭하면 /682)%EC%9D%B4로 열렸습니다.
닫는 괄호 뒤 조사를 문장으로 읽는 유한 규칙이 경로 후보에만 있었고 URL은 그 단계를 건너뛰었기 때문입니다.
이제 URL도 같은 규칙을 탑니다. URL은 디스크처럼 확인할 수 없으므로 닫는 괄호 뒤 조사는 항상 문장으로 보고, 닫는 괄호 없이 붙은 한글(.../wiki/서울이)은 기존대로 자르지 않습니다.
규칙은 parseToken에 있어 터미널 링크와 요청 뷰가 함께 고쳐집니다.

before: PR #682 (https://github.com/o/r/pull/682)이 끝   -> 링크 https://github.com/o/r/pull/682)이
after:  PR #682 (https://github.com/o/r/pull/682)이 끝   -> 링크 https://github.com/o/r/pull/682

Review

  • 판단해 주세요: URL 끝의 )이·)에서 같은 조합을 항상 문장으로 읽습니다. 실제로 )이로 끝나는 URL은 더 이상 그 꼬리까지 링크되지 않습니다.
  • 조심해서 볼 파일: web/src/terminalLinks.ts - 링크 후보는 포인터가 행에 올 때마다 계산되는 경로입니다. URL 토큰에서만 정규식 한 번과 strip 한 번이 더 돕니다.

Evidence

  • 확인한 것: 스크린샷 문장 그대로의 회귀 테스트가 수정 전 코드에서 실패하고 수정 후 통과합니다. 밑줄 범위가 URL 칸(9-40열)만 덮는 것까지 확인합니다.
  • 확인한 것: scripts/verify-web.sh web typecheck|lint|test 통과(1165 passed, 1 skipped), node scripts/check-design-contract.mjs 통과.
  • 확인하지 못한 것: 패키징한 앱에서 실제로 마우스를 올려 보는 확인은 하지 않았습니다. 파서 단위 테스트가 xterm에 넘기는 범위를 직접 검사합니다.

… link

A URL such as `(https://github.com/o/r/pull/682)이` linked `https://github.com/o/r/pull/682)이`, because the finite particle boundary applied only to path candidates. A URL now takes the same boundary in parseToken, which the terminal and the request view share, and since a URL cannot be checked the particle is always prose.
@yansfil
yansfil merged commit c1e4c90 into main Oct 7, 2026
18 checks passed
@yansfil
yansfil deleted the fix/terminal-url-korean-particle branch October 7, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant