/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ import { testDataProcessor as test } from 'ckeditor5-markdown-gfm/tests/_utils/utils'; describe( 'GFMDataProcessor', () => { // Horizontal rules are are always rendered by GitHub as
and normalized when converting // back to * * *. describe( 'horizontal rules', () => { describe( 'dashes', () => { it( '#1', () => { test( '---', '
', '* * *' ); } ); it( '#2', () => { test( ' ---', '
', '* * *' ); } ); it( '#3', () => { test( ' ---', '
', '* * *' ); } ); it( '#4', () => { test( ' ---', '
', '* * *' ); } ); it( '#5 - code', () => { test( ' ---', // Four spaces are interpreted as code block. '
---
', // Code block will be normalized to ``` representation. '```\n' + '---\n' + '```' ); } ); } ); describe( 'dashes with spaces', () => { it( '#1', () => { test( '- - -', '
', '* * *' ); } ); it( '#2', () => { test( ' - - -', '
', '* * *' ); } ); it( '#3', () => { test( ' - - -', '
', '* * *' ); } ); it( '#4', () => { test( ' - - -', '
', '* * *' ); } ); it( '#5 - code', () => { test( ' - - -', // Four spaces are interpreted as code block. '
- - -
', // Code block will be normalized to ``` representation. '```\n' + '- - -\n' + '```' ); } ); } ); describe( 'asterisks', () => { it( '#1', () => { test( '***', '
', '* * *' ); } ); it( '#2', () => { test( ' ***', '
', '* * *' ); } ); it( '#3', () => { test( ' ***', '
', '* * *' ); } ); it( '#4', () => { test( ' ***', '
', '* * *' ); } ); it( '#5 - code', () => { test( ' ***', // Four spaces are interpreted as code block. '
***
', // Code block will be normalized to ``` representation. '```\n' + '***\n' + '```' ); } ); } ); describe( 'asterisks with spaces', () => { it( '#1', () => { test( '* * *', '
', '* * *' ); } ); it( '#2', () => { test( ' * * *', '
', '* * *' ); } ); it( '#3', () => { test( ' * * *', '
', '* * *' ); } ); it( '#4', () => { test( ' * * *', '
', '* * *' ); } ); it( '#5 - code', () => { test( ' * * *', // Four spaces are interpreted as code block. '
* * *
', // Code block will be normalized to ``` representation. '```\n' + '* * *\n' + '```' ); } ); } ); describe( 'underscores', () => { it( '#1', () => { test( '___', '
', '* * *' ); } ); it( '#2', () => { test( ' ___', '
', '* * *' ); } ); it( '#3', () => { test( ' ___', '
', '* * *' ); } ); it( '#4', () => { test( ' ___', '
', '* * *' ); } ); it( '#5 - code', () => { test( ' ___', // Four spaces are interpreted as code block. '
___
', // Code block will be normalized to ``` representation. '```\n' + '___\n' + '```' ); } ); } ); describe( 'underscores with spaces', () => { it( '#1', () => { test( '_ _ _', '
', '* * *' ); } ); it( '#2', () => { test( ' _ _ _', '
', '* * *' ); } ); it( '#3', () => { test( ' _ _ _', '
', '* * *' ); } ); it( '#4', () => { test( ' _ _ _', '
', '* * *' ); } ); it( '#5 - code', () => { test( ' _ _ _', // Four spaces are interpreted as code block. '
_ _ _
', // Code block will be normalized to ``` representation. '```\n' + '_ _ _\n' + '```' ); } ); } ); } ); } );