Skip to content

Commit f73aa3c

Browse files
committed
fix regex for title if newlines before it
1 parent 78b458f commit f73aa3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/class-importer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ protected function update_post_from_markdown_source( $post_id ) {
298298
$title = $yaml['title'];
299299
} elseif ( preg_match( '/^\n*#\s(.+)/', $markdown, $matches ) ) {
300300
$title = $matches[1];
301-
$markdown = preg_replace( '/^#\swp\s(.+)/', '', $markdown );
301+
$markdown = preg_replace( '/^\n*#\swp\s(.+)/', '', $markdown );
302302
}
303303
$markdown = trim( $markdown );
304304

0 commit comments

Comments
 (0)