remove stray spaces
This commit is contained in:
parent
d73d79d2ec
commit
a5f9014f9b
|
@ -32,7 +32,7 @@ export const generatePostFrontMatter = (
|
|||
},
|
||||
} );
|
||||
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();
|
||||
|
||||
frontMatter.data.post_title = frontMatter.data.post_title ?? title;
|
||||
|
|
Loading…
Reference in New Issue