From 4070d58af75d74cad12247e2da095d5a8b92dc1f Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 18 May 2017 20:17:27 -0500 Subject: Don't copy empty elements that were not selected on purpose as GFM --- spec/features/copy_as_gfm_spec.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'spec/features') diff --git a/spec/features/copy_as_gfm_spec.rb b/spec/features/copy_as_gfm_spec.rb index be615519a09..b6c51569bdc 100644 --- a/spec/features/copy_as_gfm_spec.rb +++ b/spec/features/copy_as_gfm_spec.rb @@ -51,7 +51,6 @@ describe 'Copy as GFM', feature: true, js: true do To see how GitLab looks please see the [features page on our website](https://about.gitlab.com/features/). - - Manage Git repositories with fine grained access controls that keep your code secure - Perform code reviews and enhance collaboration with merge requests @@ -352,7 +351,6 @@ describe 'Copy as GFM', feature: true, js: true do <<-GFM.strip_heredoc, - Nested - - Lists GFM @@ -375,7 +373,6 @@ describe 'Copy as GFM', feature: true, js: true do <<-GFM.strip_heredoc, 1. Nested - 1. Numbered lists GFM -- cgit v1.2.1 From 850b99830ef34c3dad83cf08f2390dd67567b945 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 23 May 2017 14:56:05 -0500 Subject: Add spec --- spec/features/copy_as_gfm_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'spec/features') diff --git a/spec/features/copy_as_gfm_spec.rb b/spec/features/copy_as_gfm_spec.rb index b6c51569bdc..3ed7d5710ab 100644 --- a/spec/features/copy_as_gfm_spec.rb +++ b/spec/features/copy_as_gfm_spec.rb @@ -65,6 +65,19 @@ describe 'Copy as GFM', feature: true, js: true do GFM ) + aggregate_failures('an accidentally selected empty element') do + gfm = '# Heading1' + + html = <<-HTML.strip_heredoc +

Heading1

+ +

+ HTML + + output_gfm = html_to_gfm(html) + expect(output_gfm.strip).to eq(gfm.strip) + end + verify( 'InlineDiffFilter', -- cgit v1.2.1