/** * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ import { testDataProcessor } from '../_utils/utils'; describe( 'GFMDataProcessor', () => { describe( 'images', () => { it( 'should process images', () => { testDataProcessor( '![alt text](http://example.com/image.png "title text")', // GitHub is rendering as: //

...

// We will handle images separately by features. '

alt text

' ); } ); it( 'should process images without title', () => { testDataProcessor( '![alt text](http://example.com/image.png)', '

alt text

' ); } ); it( 'should process images without alt text', () => { testDataProcessor( '![](http://example.com/image.png "title text")', '

' ); } ); it( 'should process referenced images', () => { testDataProcessor( '![alt text][logo]\n\n' + '[logo]: http://example.com/image.png "title text"', '

alt text

', // Referenced images when converting back are converted to direct links. '![alt text](http://example.com/image.png "title text")' ); } ); it( 'should process referenced images without title', () => { testDataProcessor( '![alt text][logo]\n\n' + '[logo]: http://example.com/image.png', '

alt text

', // Referenced images when converting back are converted to direct links. '![alt text](http://example.com/image.png)' ); } ); it( 'should process referenced images without alt text', () => { testDataProcessor( '![][logo]\n\n' + '[logo]: http://example.com/image.png "title text"', '

', // Referenced images when converting back are converted to direct links. '![](http://example.com/image.png "title text")' ); } ); } ); } );