Revert comark markdown renderer back to marked in Svelte package
Session from pi-web on Hugging Face by woxQAQ · MIT · condensed by Coders Talk
5msession
0interventions
GOAL
Revert a previous commit that had switched the Svelte MarkdownRenderer component from marked to the comark library, restoring the marked-based rendering pipeline and resolving the resulting merge conflicts.
- +0Prompt · +0Revert the commit 81c6074 that introduced comark for markdown rendering
- +0mAgent did · +0mInspected the target commit's stats and diff, ran git revert --no-commit which produced conflicts in package.json, MarkdownRenderer.svelte and pnpm-lock.yaml, then reviewed git log and later commits touching the same file to understand what had changed since
- +1mAgent did · +1mManually edited package.json and MarkdownRenderer.svelte to resolve the merge conflict markers, restored pnpm-lock.yaml from HEAD and regenerated it with pnpm install --lockfile-only for the svelte package
- +3mAgent did · +3mRan pnpm run build:web to verify the revert built cleanly, then edited the onMount/event listener logic in MarkdownRenderer.svelte to move click handling onto the real DOM node and avoid a11y warnings
- +4mAgent did · +4mFinished the git revert (git revert --quit), unstaged the resolved files, and diffed them to confirm the changes cleanly removed comark and restored the marked-based implementation, along with the a11y fix
- +5mOutcome · +5mComark removed and marked/DOMPurify rendering restored in MarkdownRenderer.svelte and package.json/pnpm-lock.yaml; pnpm run build:web passed with no new errors; changes left uncommitted, agent offered to make a conventional commit
VERDICT
Next time I'd ask upfront for the revert plus a rebuild/lint check in one go, since resolving the three-way conflicts in package.json, the lockfile and the component took most of the turns. The manual conflict resolution and lockfile regeneration via pnpm install --lockfile-only was what actually made the revert usable — a plain git revert alone wasn't enough given the intervening a11y and wrapping commits on the same file.