Commit Graph

9 Commits

Author SHA1 Message Date
panjan 6b4c6fa193 Fix Markdown styling inside reference links
Fixes: https://gitlab.com/gitlab-org/gitlab-ce/issues/18096
2016-11-01 09:49:30 +00:00
Felipe Artur 8e4301d982 Prevent wrong markdown on issue ids when project has Jira service activated 2016-10-19 13:46:04 -02:00
Yorick Peterse 86166d2802
Split Markdown rendering & reference gathering
This splits the Markdown rendering and reference extraction phases into
two distinct code bases. The reference extraction phase no longer relies
on the html-pipeline Gem (and any related code) and allows for
extracting of references from multiple HTML nodes in a single pass. This
means that if you want to extract user references from 200 comments you
no longer need to run 200 times N number of queries, instead only a
handful of queries may be needed.
2016-05-26 17:14:00 +02:00
Yorick Peterse 7f0fd73eeb Cache default_issues_tracker? in Banzai
Every object processed by ExternalIssueReferenceFilter can return a
different Project instance when calling "project". For example, every
note processed will have it's own associated Project. If we were to
cache Project#default_issues_tracker? on Project level this would have
no impact on Markdown rendering timings as the cache would have to be
built for every Project instance without it ever being re-used.

To work around this we cache Project#default_issues_tracker? in
Banzai::Filter::ExternalIssueReferenceFilter using the project's _id_
instead of the whole object. This setup allows re-using of the cached
data even when the Project instances used are different, as long as the
actual project IDs are the same.
2016-04-04 10:44:35 +02:00
Yorick Peterse 1411480577 Refactor processing of various Banzai filters
These filters now use a single iteration over all the document nodes
instead of multiple ones. This in turn allows variables to be re-used
(e.g. links only have to be unescaped once). Combined with some other
refactoring this can drastically reduce render timings.
2016-04-04 10:44:35 +02:00
Douwe Maan 2a20c0e590 Prevent circular reference error in Banzai 2016-01-14 11:30:28 +01:00
Douwe Maan 37993d3957 Escape all the things. 2015-12-24 21:36:33 +01:00
Drew Blessing f177aaa5fa Backport JIRA service 2015-12-18 14:19:48 -06:00
Douwe Maan 7781bda9bd Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00