블로그 글로도 적어봤습니다. 재현 환경 구성 하는거 너무 노가다인데 어떻게 잘 할까..
Hackers' Pub으로도 가져왔습니다
https://hackers.pub/@moreal/2025/vitepress-localsearchplugin-debugging
VitePress localSearchPlugin 버그 디버깅하기
이 글은 Zenn 트렌드 봇 제작 중 VitePress 로컬 검색 기능의 버그를 발견하고 수정하는 과정을 담고 있습니다. Fedify 문서에서 검색 기능이 제대로 작동하지 않는 것을 확인한 후, 코드 블록 내의 특정 마크다운 문법(`markdown-it-jsr-ref` 플러그인)이 문제임을 밝혀냈습니다. VitePress의 `localSearchPlugin.ts` 파일을 분석하여, 헤딩 내의 `<a>` 태그를 처리하는 정규식의 non-greedy한 특성이 버그의 원인임을 알아내고, 정규식에서 `?` 기호를 제거하여 문제를 해결했습니다. PR을 통해 수정 사항을 제안하고 빠르게 머지된 경험을 공유하며, 디버깅 과정과 PR 준비에 대한 회고와 함께 개선점을 제시합니다. 이 글은 문제 해결 과정과 디버깅 경험을 통해 독자들에게 인사이트를 제공합니다.
hackers.pub · Hackers' Pub
Link author: Lee Dogeon@moreal@hackers.pub
If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/0197a102-f754-748e-be86-83f5d4772394 on your instance and reply to it.