Commit Graph
28 Commits
Author SHA1 Message Date
Jason Lee 41bcab118a Fix #9963 reference_filter "Encoding::CompatibilityError" bug with some complex URL; 2016-01-12 18:19:55 +08:00
Robert Speicher b1539116f6 Merge branch 'task-list-class' into 'master'
Properly set task-list class on single item task lists

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4193

See merge request !2330
2016-01-07 20:10:07 +00:00
Robert Speicher 90510f0037 Merge branch 'milestone-ref' into 'master'
Link to milestone in "Milestone changed" system note

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4141

See merge request !2203
2016-01-07 19:22:43 +00:00
Douwe Maan c3865bda02 Properly set task-list class on single item task lists 2016-01-07 15:52:34 +01:00
Douwe Maan 6865d3e500 Merge branch 'rs-issue-1697' into 'master'
Define a limited set of filters for SingleLinePipeline

Removes the following filters from its parent GfmPipeline:

- SyntaxHighlightFilter
- UploadLinkFilter
- TableOfContentsFilter
- LabelReferenceFilter
- TaskListFilter

Closes #1697 

See merge request !2257
2016-01-06 18:31:28 +00:00
Douwe Maan cf19efec3a Revert "Temporarily disable Markdown caching"
This reverts commit d337d5e713.
2016-01-06 13:26:02 +01:00
Douwe Maan b9ed3961b5 Revert "Add DEBUG_BANZAI_CACHE env var to debug Banzai cache issue."
This reverts commit 4b027bc93a.
2016-01-06 13:25:13 +01:00
Robert Speicher 1e6fc0c6a4 Define a limited set of filters for SingleLinePipeline
Removes the following filters from its parent GfmPipeline:

- SyntaxHighlightFilter
- UploadLinkFilter
- TableOfContentsFilter
- LabelReferenceFilter
- TaskListFilter

Closes #1697
2016-01-05 17:13:21 -05:00
Douwe Maan 0b66151632 Remove icon from milestone reference. 2016-01-05 16:45:53 +01:00
Douwe Maan fd91b48f24 Merge branch 'master' into milestone-ref 2016-01-05 16:40:23 +01:00
Douwe Maan a7c424515c Merge branch 'rs-relative-links-to-root' into 'master'
Support a single directory traversal in RelativeLinkFilter

Prior, if we were viewing a blob at
`https://example.com/namespace/project/blob/master/doc/some-file.md` and
it contained a relative link such as `[README](../README.md)`, the
resulting link when viewing the blob would be:
`https://example.com/namespace/project/blob/README.md` which omits the
`master` ref, resulting in a 404.

Fixes https://gitlab.com/gitlab-org/release-tools/issues/3

See merge request !2247
2016-01-05 13:32:25 +00:00
Douwe Maan 4b027bc93a Add DEBUG_BANZAI_CACHE env var to debug Banzai cache issue. 2016-01-04 14:30:30 +01:00
Yorick Peterse 054df415f9 Optimize CSS expressions produced by Nokogiri
Nokogiri produces inefficient XPath expressions when given CSS
expressions such as "a.gfm". Luckily these expressions can be optimized
quite easily while still achieving the same results.

In the two cases where this optimization is applied the run time has
been reduced from around 170 ms to around 15 ms.
2015-12-31 15:46:47 +01:00
Yorick Peterse d3951dfaa1 Don't use delegate to delegate trivial methods
Around 300 ms (in total) would be spent in these delegated methods due
to the extra stuff ActiveSupport adds to the compiled methods. Because
these delegations are so simple we can just manually define the methods,
saving around 275 milliseconds.
2015-12-31 15:46:47 +01:00
Yorick Peterse 3077cb52d9 Use XPath for searching link nodes
This is a tad faster than letting Nokogiri figure out whether it should
evaluate the query as CSS or XPath and then actually evaluating it.
2015-12-31 15:46:47 +01:00
Robert Speicher d9d2e8a3e8 Support a single directory traversal in RelativeLinkFilter
Prior, if we were viewing a blob at
`https://example.com/namespace/project/blob/master/doc/some-file.md` and
it contained a relative link such as `[README](../README.md)`, the
resulting link when viewing the blob would be:
`https://example.com/namespace/project/blob/README.md` which omits the
`master` ref, resulting in a 404.
2015-12-30 15:36:59 -05:00
Robert Speicher a97a2d2720 Merge branch 'mention-all' into 'master'
Only allow group/project members to mention `@all`

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3473

See merge request !2205
2015-12-27 21:09:16 +00:00
Douwe Maan 7dedd997b9 Merge branch 'master' into milestone-ref 2015-12-25 13:16:33 +01:00
Douwe Maan 37993d3957 Escape all the things. 2015-12-24 21:36:33 +01:00
Douwe Maan 32543f3bd9 More escaping! 2015-12-24 21:19:03 +01:00
Douwe Maan 672cbbff95 Only allow group/project members to mention @all 2015-12-24 15:33:51 +01:00
Douwe Maan 989131c530 Render milestone links as references 2015-12-24 14:43:07 +01:00
Douwe Maan 331154ffdf Escape reference link text 2015-12-24 14:38:23 +01:00
Drew Blessing f177aaa5fa Backport JIRA service 2015-12-18 14:19:48 -06:00
Douwe Maan d337d5e713 Temporarily disable Markdown caching 2015-12-16 18:50:06 +01:00
Dmitriy Zaporozhets 40104746d6 Merge remote-tracking branch 'origin/feature/update-rubocop' 2015-12-16 13:44:50 +01:00
Douwe Maan 6560d053ed Use lazy reference extractor to get issue's MRs 2015-12-15 16:57:11 +01:00
Douwe Maan 7781bda9bd Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00