Move Markdown/reference logic from `Gitlab::Markdown` to `Banzai`
- Moves from
Gitlab::Markdown
toBanzai
- Moves filters and pipelines into their own namespace:
Banzai::Filter
andBanzai::Pipeline
- No more
autoload
! - Split up
Gitlab::ReferenceExtractor
intoBanzai::ReferenceExtractor
andGitlab::ReferenceExtractor
- Replace
something(load_lazy_references: true)
byGitlab::ReferenceExtractor.lazily { something }
Goes from:
def referenced_merge_requests
references = [self, *notes].flat_map do |note|
note.all_references(load_lazy_references: false).merge_requests
end.uniq!
Gitlab::Markdown::ReferenceFilter::LazyReference.load(references).uniq.sort_by(&:iid)
end
to
def referenced_merge_requests
Gitlab::ReferenceExtractor.lazily do
[self, *notes].flat_map do |note|
note.all_references.merge_requests
end
end.sort_by(&:iid)
end