Commit d95bffc6 authored by Toon Claes's avatar Toon Claes

Rename GitlabMarkdownHelper -> MarkupHelper

It does more than solely GitLab Markdown, so rename to MarkupHelper.
parent 025b04f3
require 'nokogiri' require 'nokogiri'
module GitlabMarkdownHelper module MarkupHelper
# Use this in places where you would normally use link_to(gfm(...), ...). # Use this in places where you would normally use link_to(gfm(...), ...).
# #
# It solves a problem occurring with nested links (i.e. # It solves a problem occurring with nested links (i.e.
......
class BaseMailer < ActionMailer::Base class BaseMailer < ActionMailer::Base
helper ApplicationHelper helper ApplicationHelper
helper GitlabMarkdownHelper helper MarkupHelper
attr_accessor :current_user attr_accessor :current_user
helper_method :current_user, :can? helper_method :current_user, :can?
......
require 'spec_helper' require 'spec_helper'
describe 'Copy as GFM', feature: true, js: true do describe 'Copy as GFM', feature: true, js: true do
include GitlabMarkdownHelper include MarkupHelper
include RepoHelpers include RepoHelpers
include ActionView::Helpers::JavaScriptHelper include ActionView::Helpers::JavaScriptHelper
......
...@@ -26,7 +26,7 @@ require 'erb' ...@@ -26,7 +26,7 @@ require 'erb'
describe 'GitLab Markdown', feature: true do describe 'GitLab Markdown', feature: true do
include Capybara::Node::Matchers include Capybara::Node::Matchers
include GitlabMarkdownHelper include MarkupHelper
include MarkdownMatchers include MarkdownMatchers
# Sometimes it can be useful to see the parsed output of the Markdown document # Sometimes it can be useful to see the parsed output of the Markdown document
......
require 'spec_helper' require 'spec_helper'
describe GitlabMarkdownHelper do describe MarkupHelper do
include ApplicationHelper include ApplicationHelper
let!(:project) { create(:project, :repository) } let!(:project) { create(:project, :repository) }
......
...@@ -595,7 +595,7 @@ describe SystemNoteService, services: true do ...@@ -595,7 +595,7 @@ describe SystemNoteService, services: true do
end end
shared_examples 'cross project mentionable' do shared_examples 'cross project mentionable' do
include GitlabMarkdownHelper include MarkupHelper
it 'contains cross reference to new noteable' do it 'contains cross reference to new noteable' do
expect(subject.note).to include cross_project_reference(new_project, new_noteable) expect(subject.note).to include cross_project_reference(new_project, new_noteable)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment