Explorar el Código

Merge pull request #1762 from ckeditor/t/cf/2804

Internal: Removed an extra space caused by snippet's empty div on top of the feature overview.
Maciej Bukowski hace 6 años
padre
commit
8f2e8139ff
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      scripts/docs/snippetadapter.js

+ 4 - 2
scripts/docs/snippetadapter.js

@@ -163,8 +163,10 @@ module.exports = function snippetAdapter( snippets, options, umbertoHelpers ) {
 
 					let snippetHTML = fs.readFileSync( snippetData.snippetSources.html ).toString();
 
-					snippetHTML = snippetHTML.replace( /%BASE_PATH%/g, snippetData.basePath );
-					snippetHTML = `<div class="live-snippet">${ snippetHTML }</div>`;
+					if ( snippetHTML.trim() ) {
+						snippetHTML = snippetHTML.replace( /%BASE_PATH%/g, snippetData.basePath );
+						snippetHTML = `<div class="live-snippet">${ snippetHTML }</div>`;
+					}
 
 					content = content.replace( getSnippetPlaceholder( snippetData.snippetName ), snippetHTML );