Przeglądaj źródła

Code formatting, renamed del tests to strikethrough.

Szymon Kupś 9 lat temu
rodzic
commit
24b30c816e

+ 2 - 4
packages/ckeditor5-markdown-gfm/src/lib/to-markdown/converters.js

@@ -34,7 +34,6 @@ export default [
 			return `[${ content }](${ title })`;
 		}
 	},
-
 	// Headers - fixing newline at the beginning.
 	{
 		filter: [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' ],
@@ -49,16 +48,15 @@ export default [
 			return hPrefix + ' ' + content;
 		}
 	},
-
 	// Inline code - fixing backticks inside code blocks.
 	{
-		filter: function (node) {
+		filter: ( node ) => {
 			const hasSiblings = node.previousSibling || node.nextSibling;
 			const isCodeBlock = node.parentNode.nodeName === 'PRE' && !hasSiblings;
 
 			return node.nodeName === 'CODE' && !isCodeBlock;
 		},
-		replacement: function (content) {
+		replacement: ( content ) => {
 
 			// If content starts or ends with backtick - use double backtick.
 			if ( content.indexOf( '`' ) > -1 ) {

+ 3 - 3
packages/ckeditor5-markdown-gfm/tests/gfmdataprocessor/del.js

@@ -6,8 +6,8 @@
 import { testDataProcessor as test } from '/tests/markdown-gfm/_utils/utils.js';
 
 describe( 'GFMDataProcessor', () => {
-	describe( 'del', () => {
-		it( 'should process deleted text', () => {
+	describe( 'Strikethrough', () => {
+		it( 'should process strikethrough text', () => {
 			test(
 				'~~deleted~~',
 
@@ -17,7 +17,7 @@ describe( 'GFMDataProcessor', () => {
 			);
 		} );
 
-		it( 'should process deleted inside text', () => {
+		it( 'should process strikethrough inside text', () => {
 			test(
 				'This is ~~deleted content~~.',