Commit Graph

31 Commits

Author SHA1 Message Date
Robert Speicher 611912fe68 Store the demodulized reference filter name in data attribute 2015-12-07 19:40:46 -05:00
Douwe Maan d611a38798 Merge branch 'master' into reference-pipeline-and-caching 2015-12-07 14:48:53 +01:00
Douwe Maan 2f5074dc39 Expand inline docs. 2015-12-01 17:14:42 +01:00
Douwe Maan 1d6d757dbd Allow reference format as link href 2015-12-01 16:25:56 +01:00
Douwe Maan f3ea06eb7f Autolink first so we don't pick up numeric anchors as issue references. 2015-12-01 15:53:32 +01:00
Douwe Maan e1e67d383e Move Markdown filters and pipelines into folders. 2015-11-19 16:18:13 +01:00
Yorick Peterse afdc028516 Speed up searching for text references a bit
If a node is ignored there's no need for searching for a given pattern.
In turn, when searching for the pattern there's no need to construct a
MatchData object as we only care about presence (or lack thereof), not
the resulting matches.

In terms of performance this cuts down about 200 ms when loading
issue #2164 locally, though this varies a bit depending on system load.
2015-10-20 15:52:40 +02:00
Douwe Maan cd2583a3be Code cleanup 2015-10-13 23:03:53 +02:00
Douwe Maan 93fcddd7a7 Allow ReferenceExtractor to efficiently load references from multiple texts at once 2015-10-13 22:53:05 +02:00
Douwe Maan 251e13666d Efficiently load multiple references of one type. 2015-10-13 18:23:49 +02:00
Douwe Maan 5dd77358f6 Pass project to RedactorFilter 2015-10-13 13:36:47 +02:00
Douwe Maan 9d066bc941 Raise error when a ReferenceFilter doesn't implement referenced_by 2015-10-08 13:00:49 +02:00
Robert Speicher e0f9d3a547 Update ReferenceFilter docs
[ci skip]
2015-10-07 18:40:54 -04:00
Douwe Maan 72afcbcd37 Always allow references to the current project 2015-10-07 19:19:23 +02:00
Douwe Maan f42cfa9e87 Refactor reference gathering to use a dedicated filter 2015-10-07 17:00:48 +02:00
Robert Speicher c104f4d590 Remove unnecessary `strip` from `reference_class` method 2015-08-31 16:23:46 -04:00
Robert Speicher 9bb06ae9ef Make sure the main Gitlab::Markdown module gets loaded before filters 2015-08-27 16:02:49 -07:00
Robert Speicher 8e7111f79d Reference filters no longer take a custom class context option 2015-08-27 15:36:26 -07:00
Robert Speicher 32e63ba7a1 Add `data-[type]-id` attribute to reference links
This is to let us redact them later in another filter.
2015-08-08 16:43:29 -04:00
Douwe Maan 94919c7ef6 Ignore references in blockquotes. 2015-06-02 13:17:21 +02:00
Robert Speicher 9d032cddf5 Correct the ReferenceFilter html/pipeline/filter require 2015-05-26 15:48:31 -04:00
Robert Speicher 9d3a1d0054 Fix docs for `push_result`
[ci skip]
2015-04-25 17:44:24 -04:00
Robert Speicher 07a88040a4 Fix NotificationService spec 2015-04-25 16:46:06 -04:00
Robert Speicher c0a97d70ef Don't allow nil references to get added to results 2015-04-25 14:41:06 -04:00
Robert Speicher 879be42862 Initialize the references result Hash in ReferenceFilter 2015-04-25 14:39:44 -04:00
Robert Speicher fb5116caa2 Use `search_text_nodes` helper in our custom filters
Closes #1477
2015-04-22 13:18:15 -04:00
Robert Speicher b905702d4f Escape title attributes in references 2015-04-20 13:01:46 -04:00
Robert Speicher 31172475d2 Better guard against nil projects in ReferenceFilter 2015-04-20 13:01:46 -04:00
Robert Speicher 9eaaa7cdef Minor doc fix
[ci skip]
2015-04-20 13:01:45 -04:00
Robert Speicher b3b8fc6c8a DRY up reference filters using ReferenceFilter base class 2015-04-20 13:01:45 -04:00
Robert Speicher 6189b24fdd Add a ReferenceFilter base class
This will allow for the removal of a lot of duplication from the
reference filters.
2015-04-20 13:01:45 -04:00