Skip to content

Commit

Permalink
fix(docusaurus-utils): Better fix
Browse files Browse the repository at this point in the history
  • Loading branch information
scastiel committed Jan 31, 2023
1 parent 3394bba commit a16c897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/docusaurus-utils/src/markdownUtils.ts
Expand Up @@ -55,8 +55,8 @@ export function createExcerpt(fileString: string): string | undefined {
const fileLines = fileString
.trimStart()
// Remove Markdown alternate title
.replace(/^[^\n]*\n[=]+/g, '')
.split('\n');
.replace(/^[^\r\n]*\r?\n[=]+/g, '')
.split(/\r?\n/);
let inCode = false;
let inImport = false;
let lastCodeFence = '';
Expand Down

0 comments on commit a16c897

Please sign in to comment.