From d89f56161297921f3f3ccdf0d186f39ff1c0a4d3 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 19 Jan 2017 13:47:54 -0600 Subject: Improve support for linebreaks, tables and nested blockquotes in lists --- spec/features/copy_as_gfm_spec.rb | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'spec/features/copy_as_gfm_spec.rb') diff --git a/spec/features/copy_as_gfm_spec.rb b/spec/features/copy_as_gfm_spec.rb index 86cb67d275a..6656d6a1e5d 100644 --- a/spec/features/copy_as_gfm_spec.rb +++ b/spec/features/copy_as_gfm_spec.rb @@ -236,8 +236,6 @@ describe 'Copy as GFM', feature: true, js: true do it 'supports SanitizationFilter' do verify( <<-GFM.strip_heredoc - BR:
- sub
@@ -284,6 +282,8 @@ describe 'Copy as GFM', feature: true, js: true do it 'supports MarkdownFilter' do verify( + "Line with two spaces at the end \nto insert a linebreak", + '`code`', '`` code with ` ticks ``', @@ -308,7 +308,7 @@ describe 'Copy as GFM', feature: true, js: true do # multiline list item <<-GFM.strip_heredoc, - Multiline - List item + List item GFM # nested lists @@ -316,7 +316,14 @@ describe 'Copy as GFM', feature: true, js: true do - Nested - - Lists + - Lists + GFM + + # list with blockquote + <<-GFM.strip_heredoc, + - List + + > Blockquote GFM '1. Numbered list item', @@ -324,7 +331,7 @@ describe 'Copy as GFM', feature: true, js: true do # multiline numbered list item <<-GFM.strip_heredoc, 1. Multiline - Numbered list item + Numbered list item GFM # nested numbered list @@ -332,7 +339,7 @@ describe 'Copy as GFM', feature: true, js: true do 1. Nested - 1. Numbered lists + 1. Numbered lists GFM '# Heading', @@ -355,10 +362,18 @@ describe 'Copy as GFM', feature: true, js: true do # table <<-GFM.strip_heredoc, | Centered | Right | Left | - | :------: | ----: | ---- | + |:--------:|------:|------| | Foo | Bar | **Baz** | | Foo | Bar | **Baz** | GFM + + # table with empty heading + <<-GFM.strip_heredoc, + | | x | y | + |---|---|---| + | a | 1 | 0 | + | b | 0 | 1 | + GFM ) end -- cgit v1.2.1