mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-15 15:55:56 +02:00
refactor(v2): cleanup console output (#4979)
* refactor(v2): cleanup console output * fix jest issue Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
8501db78a1
commit
41d9288e3d
86 changed files with 382 additions and 339 deletions
|
@ -160,8 +160,8 @@ export function parseMarkdownString(
|
|||
};
|
||||
} catch (e) {
|
||||
console.error(
|
||||
chalk.red(`Error while parsing markdown front matter.
|
||||
This can happen if you use special characters like : in frontmatter values (try using "" around that value)`),
|
||||
chalk.red(`Error while parsing Markdown frontmatter.
|
||||
This can happen if you use special characters in frontmatter values (try using double quotes around that value).`),
|
||||
);
|
||||
throw e;
|
||||
}
|
||||
|
@ -176,8 +176,7 @@ export async function parseMarkdownFile(
|
|||
return parseMarkdownString(markdownString, options);
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Error while parsing markdown file ${source}
|
||||
${e.message}`,
|
||||
`Error while parsing Markdown file ${source}: "${e.message}".`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue