remove stray spaces

This commit is contained in:
Ron Rennick 2023-11-29 16:47:08 -04:00
parent d73d79d2ec
commit a5f9014f9b
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ export const generatePostFrontMatter = (
}, },
} ); } );
const content = frontMatter.content.split( '\n' ); const content = frontMatter.content.split( '\n' );
const headings = content.filter( ( line ) => line.substring( 0, 2 ) === '# ' ); const headings = content.filter( ( line ) => line.substring( 0, 2 ) === '# ' );
const title = headings[0]?.substring( 2 ).trim(); const title = headings[0]?.substring( 2 ).trim();
frontMatter.data.post_title = frontMatter.data.post_title ?? title; frontMatter.data.post_title = frontMatter.data.post_title ?? title;