Skip to content

Fix comma-separated [ID:x, ID:y] replacement and add JS unit tests - #11

Merged
fumikito merged 1 commit into
masterfrom
bugfix/multiple-refs
Jan 27, 2026
Merged

Fix comma-separated [ID:x, ID:y] replacement and add JS unit tests#11
fumikito merged 1 commit into
masterfrom
bugfix/multiple-refs

Conversation

@fumikito

Copy link
Copy Markdown
Member

Summary

  • LLMが [ID:100, ID:200] のようにカンマ区切りでIDを出力した場合にリンクに変換されない問題を修正
  • parseMarkdownreplaceIdReferencesutils.js に切り出し、テスト可能に
  • Jest テストスイートを tests/js/ に追加(npm run test:js で実行)
  • GitHub Actions の assets ジョブに JS ユニットテストステップを追加

Test plan

  • npm run test:js が全テスト通過することを確認
  • npm run build:blocks でビルドが成功することを確認
  • AI Overview ブロックで [ID:xxx] および [ID:xxx, ID:yyy] パターンが正しくリンクに変換されることを確認

🤖 Generated with Claude Code

- Extract parseMarkdown and replaceIdReferences into utils.js for testability
- Support comma-separated ID patterns like [ID:100, ID:200]
- Add Jest test suite via wp-scripts test-unit-js (npm run test:js)
- Add JS unit test step to GitHub Actions assets job

Co-authored-by: Claude <noreply@anthropic.com>
@fumikito
fumikito merged commit cec9f36 into master Jan 27, 2026
9 checks passed
@fumikito
fumikito deleted the bugfix/multiple-refs branch January 27, 2026 14:30
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