summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2019-04-04 13:08:34 +0000
committerDouwe Maan <douwe@gitlab.com>2019-04-04 13:08:34 +0000
commite540c0d71e00c4ce031b94cf11ec3de905e87da7 (patch)
treefdd99edfd413a3473fe4a9f72719913decfd9777 /lib/banzai
parent30988aecd9fe8223563d02942666683fb1bd29c0 (diff)
downloadgitlab-ce-e540c0d71e00c4ce031b94cf11ec3de905e87da7.tar.gz
Fixed test specs
- added suggestions to mock data - fixed props to be not required
Diffstat (limited to 'lib/banzai')
-rw-r--r--lib/banzai/suggestions_parser.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/banzai/suggestions_parser.rb b/lib/banzai/suggestions_parser.rb
deleted file mode 100644
index 0d7f751bfc1..00000000000
--- a/lib/banzai/suggestions_parser.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-# frozen_string_literal: true
-
-# TODO: Delete when https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26107
-# exchange this parser by `Gitlab::Diff::SuggestionsParser`.
-module Banzai
- module SuggestionsParser
- # Returns the content of each suggestion code block.
- #
- def self.parse(text)
- html = Banzai.render(text, project: nil, no_original_data: true)
- doc = Nokogiri::HTML(html)
-
- doc.search('pre.suggestion').map { |node| node.text }
- end
- end
-end