/** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ import { testDataProcessor as test } from 'tests/markdown-gfm/_utils/utils.js'; describe( 'GFMDataProcessor', () => { describe( 'strong and emphasis', () => { it( 'should process strong', () => { test( '**this is strong** and __this too__', '
this is strong and this too
', // When converting back strong will always be represented by **. '**this is strong** and **this too**' ); } ); it( 'should process emphasis', () => { test( '*this is emphasis* and _this too_', 'this is emphasis and this too
', // When converting back emphasis will always be represented by __. '_this is emphasis_ and _this too_' ); } ); it( 'should process strong and emphasis together #1', () => { test( '***This is strong and em.***', 'This is strong and em.
', // Normalized after converting back. '**_This is strong and em._**' ); } ); it( 'should process strong and emphasis together #2', () => { test( 'Single ***word*** is strong and em.', 'Single word is strong and em.
', // Normalized after converting back. 'Single **_word_** is strong and em.' ); } ); it( 'should process strong and emphasis together #3', () => { test( '___This is strong and em.___', 'This is strong and em.
', // Normalized after converting back. '**_This is strong and em._**' ); } ); it( 'should process strong and emphasis together #4', () => { test( 'Single ___word___ is strong and em.', 'Single word is strong and em.
', // Normalized after converting back. 'Single **_word_** is strong and em.' ); } ); it( 'should not process emphasis inside words', () => { test( 'This should_not_be_emp.', 'This should_not_be_emp.
' ); } ); // Below two tests are not working because marked library renders nested emphasis differently than // it is done on GitHub. // it( 'should process nested emphasis #1', () => { // test( // '*test **test** test*', // // // GitHub is rendering as: // //test *test** test*
// // 'test *test** test*
' // ); // } ); // it( 'should process nested emphasis #2', () => { // test( // '_test __test__ test_', // // // GitHub is rendering as: // 'test __test_ test_
' // ); // } ); } ); } );