summaryrefslogtreecommitdiff
path: root/lib/banzai/pipeline
Commit message (Collapse)AuthorAgeFilesLines
* Add Colors to GitLab Flavored MarkdownTony Rom2018-01-292-0/+2
|
* Use relative URLs when linking to uploaded filesNick Thomas2017-12-221-1/+0
|
* Add support of MermaidVitaliy @blackst0ne Klachkov2017-11-221-0/+1
|
* Resolve "DashboardController#activity.json is slow due to SQL"Francisco Javier López2017-11-061-1/+2
|
* Remove ImageLazyLoadFilter from EmailPipeline37629-lazy-image-loading-breaks-notification-mails-for-an-added-screenshotRobert Speicher2017-09-121-0/+6
|
* Whitelist or fix additional `Gitlab/PublicSend` cop violationsrs-more-public-send-whitelistsRobert Speicher2017-08-141-1/+1
| | | | | An upcoming update to rubocop-gitlab-security added additional violations.
* Resolve "Lazy load images on the Frontend"Tim Zallmann2017-07-241-0/+1
|
* Fix LaTeX formatting for AsciiDoc wikiJarka Kadlecova2017-05-241-0/+14
|
* Merge branch 'bvl-security-9-1-markup-pipeline'Robert Speicher2017-05-101-0/+13
| | | | | | (security-9-1) Render asciidoc & other markup using banzai in a pipeline See merge request !2098
* Add indication for closed or merged issuables in GFMadam-finish-5993-closed-issuableAdam Buckland2017-04-071-0/+1
| | | | | | | | | | | | | | | Example: for issues that are closed, the links will now show '[closed]' following the issue number. This is done as post-process after the markdown has been loaded from the cache as the status of the issue may change between the cache being populated and the content being displayed. In order to avoid N+1 queries problem when rendering notes ObjectRenderer populates the cache of referenced issuables for all notes at once, before the post processing phase. As a part of this change, the Banzai BaseParser#grouped_objects_for_nodes method has been refactored to return a Hash utilising the node itself as the key, since this was a common pattern of usage for this method.
* Merge branch '30125-markdown-security'Robert Speicher2017-04-051-1/+1
| | | | | | Remove class from SanitizationFilter whitelist See merge request !2079
* remove all references to the .es6 in our config files and documentationremove-es6-extension-configurationMike Greiling2017-03-151-2/+2
|
* PlantUML support for MarkdownHoracio Sanson2017-02-031-0/+1
| | | | | | | | | | | Allow rendering of PlantUML diagrams in Markdown documents using fenced blocks: ```plantuml Bob -> Sara : Hello Sara -> Bob : Go away ``` Closes: #4048
* Add more SyntaxHighlightFilter and MathFilter testsDouwe Maan2017-01-171-2/+4
|
* Improve specDouwe Maan2017-01-161-3/+4
|
* Copying a rendered issue/comment will paste into GFM textareas as actual GFMDouwe Maan2017-01-161-0/+3
|
* Render math in Asciidoc and Markdown with KaTeX using code blocksMunken2016-12-141-1/+1
|
* Working inline math filterMunken2016-12-081-0/+1
|
* Add RTL support to markdown rendererEbrahim Byagowi2016-10-161-1/+3
|
* HTMLEntityFilter -> HtmlEntityFilterNick Thomas2016-10-101-1/+1
|
* Enable CacheMarkdownField for the remaining modelsNick Thomas2016-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | This commit alters views for the following models to use the markdown cache if present: * AbuseReport * Appearance * ApplicationSetting * BroadcastMessage * Group * Issue * Label * MergeRequest * Milestone * Project At the same time, calls to `escape_once` have been moved into the `single_line` Banzai pipeline, so they can't be missed out by accident and the work is done at save, rather than render, time.
* Use a more powerful query to match videos in img tagsRémy Coutable2016-07-191-1/+1
| | | | | | | | Also, always add a link to download videos since video playback is tricky. Also, it solves the issue with email client not supporting videos. Signed-off-by: Rémy Coutable <remy@rymai.me>
* First support of videos in issues, MRs and notesEric Hayes2016-07-191-0/+1
| | | | | * Registered video MIME types * Currently supporting browser-supported formats with extensions that match the mime type
* Add blockquote fence syntax to MarkdownDouwe Maan2016-07-091-1/+2
|
* Enable Style/EmptyLines cop, remove redundant onesrubocop/enable-cops-for-empty-linesGrzegorz Bizon2016-07-011-1/+0
|
* Support for rendering/redacting multiple documentsYorick Peterse2016-06-241-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix description and GFM pipelines conflictingfix-markdown-specSean McGivern2016-06-131-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this command: bundle exec rails r "include GitlabMarkdownHelper puts markdown('<span>this is a span</span>', pipeline: :description) puts markdown('<span>this is a span</span>')" And the same in the opposite order: bundle exec rails r "include GitlabMarkdownHelper puts markdown('<span>this is a span</span>') puts markdown('<span>this is a span</span>', pipeline: :description)" Before this change, they would both output: <p><span>this is a span</span></p> <p>this is a span</p> That's because `span` is added to the list of whitelisted elements in the `SanitizationFilter`, but this method tries not to make the same changes multiple times. Unfortunately, `HTML::Pipeline::SanitizationFilter::LIMITED`, which is used by the `DescriptionPipeline`, uses the same Ruby objects for all of its hash values _except_ `:elements`. That means that whichever of `DescriptionPipeline` and `GfmPipeline` is called first would have `span` in its whitelisted elements, and the second wouldn't. Fix this by creating an entirely separate hash, before either pipeline is invoked.
* Split Markdown rendering & reference gatheringYorick Peterse2016-05-261-11/+0
| | | | | | | | | | 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.
* Create DiffFilter and change SystemNoteService#change_title to use ↵Adam Butler2016-05-181-1/+2
| | | | Gitlab::Diff::InlineDiff
* Merge branch 'patch/fix-markdown-preview-wikis' into 'master' Robert Speicher2016-04-071-2/+4
|\ | | | | | | | | | | | | | | | | | | | | Wiki preview URL converting problem [via Markdown] Current implementation when rendering the preview, thinks relative links are for project repository files. We are creating a new preview route that will define correct context data to render for wikis instead. Fixes #2380, #1184 See merge request !3461
| * Ensure correct filter order to validate with our markdown specpatch/fix-markdown-preview-wikisGabriel Mazetto2016-04-061-1/+1
| |
| * Fixed WikiPipeline and specsGabriel Mazetto2016-04-061-1/+1
| |
| * Added WikiLinkFilterGabriel Mazetto2016-04-011-2/+4
| |
* | Wrap images in discussions and wikis with a link to the image source using ↵connorshea2016-04-041-0/+1
|/ | | | | | | | ImageLinkFilter. Resolves #14411. See merge request !3464
* Remove redundant `require`s from Banzai filesrs-banzai-requiresRobert Speicher2016-03-242-4/+0
| | | | We're trying to avoid circular dependency errors.
* Add YamlFrontMatterFilter to the PreProcessPipelineRobert Speicher2016-03-041-1/+2
| | | | | This filter will detect YAML Front Matter and convert it to an HTML table for prettier formatting.
* Add a PreProcessPipelineRobert Speicher2016-03-021-0/+16
|
* Add FilterArray class to Banzairs-filter-arrayRobert Speicher2016-03-019-13/+10
|
* Replace Gollum `[[_TOC_]]` tag with result of TableOfContentsFilterrs-wiki-tocRobert Speicher2016-02-231-1/+5
| | | | Closes #2494
* Fix relative links in other markup formatsben.boeckel/gitlab-ce-fixup-links-in-generic-docsBen Boeckel2016-02-121-11/+0
| | | | | | | | - Apply the RelativeLinkFilter filter to other formats, e.g., reStructuredText so links from the Files view or the Project view work - Remove the AsciidocPipeline pipeline Fixes #3533.
* Allow limited Markdown in Broadcast Messagesrs-broadcast-markdownRobert Speicher2016-02-061-0/+16
| | | | Closes #11853
* Make Pipelines responsible for defining their custom whitelistrs-whitelist-in-pipelineRobert Speicher2016-02-031-1/+12
| | | | | This allows for future pipelines to more easily define a custom whitelist.
* Merge branch 'backport-ee' into 'master' Robert Speicher2016-01-1413-25/+0
|\ | | | | | | | | | | | | Backport two commits from EE Backport part of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/110 See merge request !2424
| * Prevent circular reference error in BanzaiDouwe Maan2016-01-1413-25/+0
| |
* | Remove GollumTagsPipelineDouglas Barbosa Alexandre2016-01-142-15/+4
| |
* | Use the WikiPipeline when rendering the wiki markdown contentDouglas Barbosa Alexandre2016-01-142-0/+22
|/
* Merge branch 'milestone-ref' into 'master' Robert Speicher2016-01-071-0/+1
|\ | | | | | | | | | | | | Link to milestone in "Milestone changed" system note Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4141 See merge request !2203
| * Render milestone links as referencesDouwe Maan2015-12-241-0/+1
| |
* | Define a limited set of filters for SingleLinePipeliners-issue-1697Robert Speicher2016-01-051-0/+16
|/ | | | | | | | | | | | Removes the following filters from its parent GfmPipeline: - SyntaxHighlightFilter - UploadLinkFilter - TableOfContentsFilter - LabelReferenceFilter - TaskListFilter Closes #1697
* Move Markdown/reference logic from Gitlab::Markdown to BanzaiDouwe Maan2015-12-1513-0/+230