summaryrefslogtreecommitdiff
path: root/app/helpers/gitlab_markdown_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Move pre_process into render_resultremove-banzai-pre-processYorick Peterse2016-06-211-2/+0
| | | | | | | | | | | The method Banzai::Renderer.pre_process would always be called, regardless of whether the Markdown to render was already cached or not. In cache the document _was_ cached the output of the pre-processing pipeline was ignored resulting in it doing nothing but wasting CPU cycles. This commit moves Banzai::Renderer.pre_process into Banzai::Renderer.render_result so that it's _only_ used when needed.
* Updated design of markdown buttonsPhil Hughes2016-06-171-0/+13
|
* Hook up the updated `WikiLinkFilter` to the wiki controllers.Timothy Andrew2016-06-091-1/+1
| | | | | | | | | - Need to pass in a `page_slug` to the filter, so it can rewrite based on the current page (all links are rewritten to the level of the app root). - The earlier `markdown_preview` endpoint was at the level of the wiki. We need to know the current page (for rewriting, as above), so this commit moves the endpoint to the level of a wiki page. - Fix all tests
* Enable Performance/StartWith cop and fix offensesrs-start-withRobert Speicher2016-05-231-1/+1
|
* Remove `random_markdown_tip` helperrs-remove-markdown-tipsRobert Speicher2016-04-091-23/+0
| | | | Only usage got removed in !3442
* Add a PreProcessPipelineRobert Speicher2016-03-021-0/+2
|
* Fix relative links in other markup formatsben.boeckel/gitlab-ce-fixup-links-in-generic-docsBen Boeckel2016-02-121-0/+15
| | | | | | | | - 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.
* Use the WikiPipeline when rendering the wiki markdown contentDouglas Barbosa Alexandre2016-01-141-1/+1
|
* Merge remote-tracking branch 'origin/feature/update-rubocop'Dmitriy Zaporozhets2015-12-161-1/+2
|\
| * Fixed Rubocop offensesGabriel Mazetto2015-12-151-1/+2
| |
* | Move Markdown/reference logic from Gitlab::Markdown to BanzaiDouwe Maan2015-12-151-3/+3
|/
* Merge branch 'master' into reference-pipeline-and-cachingDouwe Maan2015-11-191-1/+1
|\
| * Refactor duplciate code for groups_controller.rb and ↵Dmitriy Zaporozhets2015-11-171-1/+1
| | | | | | | | | | | | slack_service/note_message.rb Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * Remove code duplication in gitlab_markdown_helper.rbDmitriy Zaporozhets2015-11-171-28/+24
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | Use Gitlab::Markdown for Asciidoc and ReferenceExtractor pipelinesDouwe Maan2015-10-141-6/+9
| |
* | Use Gitlab::Markdown.render with :pipeline option rather than different methodsDouwe Maan2015-10-141-27/+10
|/
* Pass project to RedactorFilterDouwe Maan2015-10-131-2/+2
|
* Refactor reference gathering to use a dedicated filterDouwe Maan2015-10-071-3/+8
|
* Return strings where expectedDouwe Maan2015-10-071-2/+2
|
* Merge branch 'master' into rs-redactor-filterDouwe Maan2015-10-071-2/+2
|\
| * Fix link with emojiSAKATA Sinji2015-10-021-1/+1
| |
| * Fix cases where Markdown did not render links in activity feedStan Hu2015-09-221-1/+1
| | | | | | | | | | | | | | | | | | HTML would be stripped in `truncate_if_block` when a comment had multiple lines and the first wasn't long enough to be truncated. The use of `node.content` would strip all HTML tags. Using `node.inner_html` retains these tags and puts the "..." in between paragraph tags. Closes #2586
| * Fix Markdown links not showing up in dashboard activity feedStan Hu2015-09-201-2/+2
| | | | | | | | Closes #2586
* | Basic support for an Atom-specific rendering pipelineRobert Speicher2015-09-031-4/+6
| |
* | Return early from markdown and gfm when text is emptyRobert Speicher2015-09-031-0/+4
| |
* | Add post_process method to Gitlab::MarkdownRobert Speicher2015-09-011-2/+4
| |
* | Remove `current_user` context from markdown and gfm helpersRobert Speicher2015-09-011-2/+0
|/ | | | These helpers are no longer dependent on the current user state. Hooray!
* Remove PreferencesHelper include from GitlabMarkdownHelperrs-cleanup-redcarpet-rendererRobert Speicher2015-09-011-2/+0
|
* Make sure the `gfm` helper passes the required optionsRobert Speicher2015-08-311-1/+9
| | | | This adds some duplication, but this helper is temporary.
* Make `gfm` delegate to `Gitlab::Markdown.gfm` instead of `markdown`Robert Speicher2015-08-311-1/+1
| | | | | Some usages of the `gfm` helper depend on the text not being rendered as standard Markdown. Ugh.
* Fix context options in `markdown` helperRobert Speicher2015-08-311-5/+5
| | | | We need to send `path`, not `requested_path`.
* Add a temporary `gfm` helper that just delegates to `markdown`Robert Speicher2015-08-271-0/+6
| | | | | Some views are still calling `gfm` directly. We'll need to update them to instead call `markdown` with a `pipeline: ...` argument.
* Restore the forwarded HTML options in link_to_gfmRobert Speicher2015-08-271-0/+5
|
* Decouple Gitlab::Markdown from the GitlabMarkdownHelperRobert Speicher2015-08-271-24/+10
| | | | | This module is now the sole source of knowledge for *how* we render Markdown (and GFM).
* Remove user_color_scheme_classRobert Speicher2015-08-251-1/+1
| | | | | | | | | Instead of rendering this value server-side, we use Javascript and Gon to apply the user's color scheme (or the default) to any syntax highlighted code blocks. This will make it easier to cache these blocks in the future because they're no longer state-dependent.
* Fixed the issuescomment-box-changesDarby2015-07-091-1/+1
|
* Comment box/Placeholder text redoDarby2015-07-011-1/+1
|
* Prefix random Markdown tips with "Tip:"rs-random-placeholder-tipRobert Speicher2015-06-241-1/+1
|
* Show a random Markdown tip in the textarea placeholderRobert Speicher2015-06-231-0/+23
|
* Add PreferencesHelper moduleRobert Speicher2015-06-131-0/+1
| | | | | | | Consolidates the helpers related to user preferences. Renames `app_theme` to `user_application_theme` to better explain what it is.
* Actually ignore references in code blocks etc.Douwe Maan2015-06-021-15/+12
|
* Fix link_to_gfm with only a reference having the incorrect linkrs-issue-1721Robert Speicher2015-05-291-3/+16
| | | | Closes #1721
* Simplify `cross_project_reference` with `to_reference`Robert Speicher2015-05-261-7/+17
|
* Handle AsciiDoc better, reuse HTML pipeline filters (fixes #9263)Jakub Jirutka2015-05-181-1/+14
|
* Fix reference links in dashboard activity and ATOM feeds.dashboard-referencesDouwe Maan2015-05-141-6/+8
|
* Extract handling of relative file links to RelativeLinkFilterJakub Jirutka2015-05-111-140/+0
|
* Add Gitlab::Markdown::SanitizationFilterRobert Speicher2015-04-301-1/+1
| | | | | This just extends the HTML::Pipeline::SanitizationFilter with our custom whitelist.
* Add Gitlab::Markdown::AutolinkFilterRobert Speicher2015-04-301-3/+1
|
* Add Gitlab::Markdown::TableOfContentsFilterRobert Speicher2015-04-301-1/+0
| | | | Removes header and table of contents processing from Redcarpet renderer.
* Add footnotes support to MarkdownGuillaume Delbergue2015-04-241-1/+2
| | | | Signed-off-by: Guillaume Delbergue <guillaume.delbergue@greensocs.com>