- 01 Jul, 2016 1 commit
-
-
Grzegorz Bizon authored
-
- 30 Jun, 2016 1 commit
-
-
Yorick Peterse authored
IssueReferenceFilter will end up processing internal issue references when a project uses an external issues tracker while still using internal issue references (in the form of `#\d+`). This commit ensures that these links are rendered as external issue links, regardless of whether the project one currently views uses an internal or external issues tracker. Fixes gitlab-org/gitlab-ce#19036, gitlab-com/performance#16
-
- 27 Jun, 2016 1 commit
-
-
Connor Shea authored
Add max-height to prevent images from displaying larger than the provided screen size. Also fix a failing test and add a new one.
-
- 24 Jun, 2016 1 commit
-
-
Yorick Peterse authored
This commit changes the way certain documents are rendered (currently only Notes) and how documents are redacted. Previously both rendering and redacting would run on a per document basis. The result of this was that for every document we'd have to run countless queries just to figure out if we could display a set of links or not. This commit changes things around so that redacting Markdown documents is no longer tied into the html-pipeline Gem. This in turn allows it to redact multiple documents in a single pass, thus reducing the number of queries needed. In turn rendering issue/merge request notes has been adjusted to take advantage of this new setup. Instead of rendering Markdown somewhere deep down in a view the Markdown is rendered and redacted in the controller (taking the current user and all that into account). This has been done in such a way that the "markdown()" helper method can still be used on its own. This particular commit also paves the way for caching rendered HTML on object level. Right now there's an accessor method Note#note_html which is used for setting/getting the rendered HTML. Once we cache HTML on row level we can simply change this field to be a column and call a "save" whenever needed and we're pretty much done.
-
- 21 Jun, 2016 2 commits
-
-
Yorick Peterse authored
In the past this class would use Project#get_issue to retrieve an issue by its ID. This method would automatically determine whether to return an Issue or ExternalIssue. This commit changes IssueReferenceFilter to handle external issues again and in a somewhat more explicit manner than before. Fixes gitlab-org/gitlab-ce#18827
-
Alejandro Rodríguez authored
A lot of git operations were being repeated, for example, to build a url you would ask if the path was a Tree, which would call a recursive routine in Gitlab::Git::Tree#where, then ask if the path was a Blob, which would call a recursive routine at Gitlab::Git::Blob#find, making reference to the same git objects several times. Now we call Rugged::Tree#path, which allows us to determine the type of the path in one pass. Some other minor improvement added, like saving commonly used references instead of calculating them each time.
-
- 18 Jun, 2016 2 commits
-
-
Stan Hu authored
When using #XYZ in Markdown text, if XYZ exceeds the maximum value of a signed 32-bit integer, we get an exception when the Markdown render attempts to run `where(iids: XYZ)`. Introduce a method that will throw out out-of-bounds values. Closes #18777
-
Timothy Andrew authored
1. An exception would be raised if the filter was called with an invalid URI. Mainly because we weren't catching the `Addressable` exception. 2. This commit fixes it and adds a spec for the filter.
-
- 16 Jun, 2016 5 commits
-
-
Paco Guzman authored
-
Yorick Peterse authored
This reduces the number of queries executed in IssueReferenceFilter by retrieving the various projects/issues that may be referenced in batches _before_ iterating over all the HTML nodes. A chunk of the logic resides in AbstractReferenceFilter so it can be re-used by other filters in the future.
-
James Lopez authored
This reverts commit 13e37a3e.
-
James Lopez authored
-
Paco Guzman authored
-
- 13 Jun, 2016 1 commit
-
-
Douglas Barbosa Alexandre authored
-
- 10 Jun, 2016 1 commit
-
-
Paco Guzman authored
-
- 09 Jun, 2016 1 commit
-
-
Timothy Andrew authored
Original Comments ================= - Linking behaves as per rules documented here: https://gitlab.com/gitlab-org/gitlab-ce/blob/16568-document-wiki-linking-behavior/doc/markdown/wiki.md - All links (to other wiki pages) are rewritten to be at the level of the app root. We can't use links relative to the current page ('./foo', 'foo', '../foo'), because they won't work in the markdown preview, where the current page is suffixed with `/edit` - Move existing `WikiLinkFilter` specs to `WikiPipeline` spec. It makes sense to run these tests on the combined output of the pipeline, rather than a single filter, since we can catch issues with conflicting filters. - Add more tests to cover the new linking @rymai's Review =============== - Classes nested under `WikiLinkFilter` should declare `WikiLinkFilter`'s inherit, so nothing changes if the nested class is loaded first. - Add a blank line after a guard clause - Use keyword arguments for the `Rewriter` constructor - Invert a condition - use `if` instead of `unless` - Inline a `let` in `WikiPipeline` spec - it was only used in a single place - Change out of date spec names - Add a comment for every rewrite rule in `Rewriter`
-
- 03 Jun, 2016 2 commits
-
-
James Lopez authored
This reverts commit 3e991230.
-
James Lopez authored
# Conflicts: # app/models/project.rb
-
- 02 Jun, 2016 3 commits
-
-
Yorick Peterse authored
This changes UserReferenceFilter so it operates using the following steps: 1. Grab all username references from the input document. 2. Query the corresponding Namespace objects using a single query. 3. Iterate over all nodes to build links while re-using the objects queried in step 2. The impact of these changes is that a comment mentioning 5 different usernames no longer runs 5 different queries (1 for every username), instead it only runs a single query.
-
Yorick Peterse authored
This method returns an Array of the HTML nodes as yielded by ReferenceFilter#each_node. The method's return value is memoized to allow multiple calls without having to re-query the input document.
-
Yorick Peterse authored
This changes ReferenceFilter#each_node so that when it's called without a block an Enumerator is returned.
-
- 26 May, 2016 1 commit
-
-
Yorick Peterse authored
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.
-
- 18 May, 2016 1 commit
-
-
Adam Butler authored
-
- 12 May, 2016 2 commits
-
-
Timothy Andrew authored
- Separate 'exercise' and 'verify' steps of tests. - Use `build_stubbed` instead of `build`
-
Timothy Andrew authored
- And fix behavior for non-file hierarchical links.
-
- 10 May, 2016 2 commits
-
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
Closes #17342, closes #17363
-
- 09 May, 2016 1 commit
-
-
Stan Hu authored
Closes #1625
-
- 05 May, 2016 1 commit
-
-
Felipe Artur authored
-
- 21 Apr, 2016 5 commits
-
-
Alfredo Sumaran authored
-
Grzegorz Bizon authored
Closes #15168
-
Alejandro Rodríguez authored
-
Alejandro Rodríguez authored
-
Alejandro Rodríguez authored
Also, addint a suffix to the reference text when the milestone is in another project
-
- 06 Apr, 2016 3 commits
-
-
Gabriel Mazetto authored
-
Yorick Peterse authored
This fixes the problem where Markdown such as: ### 31st Would get rendered as a link tag pointing to issue number 31 inside a header tag. See gitlab-org/gitlab-ce#14936 for more information.
-
Gabriel Mazetto authored
-
- 05 Apr, 2016 1 commit
-
-
connorshea authored
Resolves #14411. See merge request !3464
-
- 30 Mar, 2016 1 commit
-
-
Gabriel Mazetto authored
-
- 20 Mar, 2016 1 commit
-
-
Douwe Maan authored
-