diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2019-04-04 13:08:34 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2019-04-04 13:08:34 +0000 |
commit | e540c0d71e00c4ce031b94cf11ec3de905e87da7 (patch) | |
tree | fdd99edfd413a3473fe4a9f72719913decfd9777 /lib/banzai | |
parent | 30988aecd9fe8223563d02942666683fb1bd29c0 (diff) | |
download | gitlab-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.rb | 16 |
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 |