mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
5518ccfe6b
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.