Files
openproject/lib
Kabiru Mwenja 5518ccfe6b Extract PreformattedBlocks; share parse_match; trim WP preload columns
Address follow-up polish on PR 22976 review:

- Extract `OpenProject::TextFormatting::PreformattedBlocks` (BLOCKS set +
  ancestor? helper) so PatternMatcherFilter and ResourceLinksMatcher share
  a single source of truth for the `<pre>`/`<code>` ancestry skip.
- Lift `parse_match(match)` so `process_match` and `extract_work_package_id`
  consume the same regex group → semantic name mapping.
- `with_preloaded_resources` captures `previous` unconditionally so the
  `ensure` block no longer needs a `defined?(previous)` guard.
- Preload `WorkPackage.where(id: ids).select(:id, :identifier)` only —
  `display_id`/`formatted_id` don't read other columns.
- N+1 spec switches from `have_a_query_limit(1)` to a SQL-notification
  subscriber filtered to `FROM "work_packages"` SELECTs, avoiding false
  positives from incidental Setting/User/Project queries.
2026-05-15 08:24:13 +03:00
..