mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 11:36:53 +02:00
chore: add cSpell for spell checking (#6456)
* chore: Add cSpell for spell checking * chore: exclude map files and remove dups * chore: exclude more binary files * chore: remove MD headings * Update .cspell.json * fix a few spellings * fix more * fix Signed-off-by: Joshua Chen <sidachen2003@gmail.com> * fix a few * oops Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
parent
a41a5c328c
commit
521eb119a7
64 changed files with 852 additions and 142 deletions
|
@ -552,7 +552,7 @@ Lorem Ipsum
|
|||
});
|
||||
|
||||
describe('parseMarkdownString', () => {
|
||||
test('parse markdown with frontmatter', () => {
|
||||
test('parse markdown with front matter', () => {
|
||||
expect(
|
||||
parseMarkdownString(dedent`
|
||||
---
|
||||
|
@ -592,7 +592,7 @@ describe('parseMarkdownString', () => {
|
|||
`);
|
||||
});
|
||||
|
||||
test('should warn about duplicate titles (frontmatter + markdown)', () => {
|
||||
test('should warn about duplicate titles (front matter + markdown)', () => {
|
||||
expect(
|
||||
parseMarkdownString(dedent`
|
||||
---
|
||||
|
@ -617,7 +617,7 @@ describe('parseMarkdownString', () => {
|
|||
`);
|
||||
});
|
||||
|
||||
test('should warn about duplicate titles (frontmatter + markdown alternate)', () => {
|
||||
test('should warn about duplicate titles (front matter + markdown alternate)', () => {
|
||||
expect(
|
||||
parseMarkdownString(dedent`
|
||||
---
|
||||
|
|
|
@ -84,8 +84,8 @@ export function fileToPath(file: string): string {
|
|||
return `/${file.replace(extRE, '').replace(/\\/g, '/')}`;
|
||||
}
|
||||
|
||||
export function encodePath(userpath: string): string {
|
||||
return userpath
|
||||
export function encodePath(userPath: string): string {
|
||||
return userPath
|
||||
.split('/')
|
||||
.map((item) => encodeURIComponent(item))
|
||||
.join('/');
|
||||
|
|
|
@ -192,8 +192,8 @@ export function parseMarkdownString(
|
|||
excerpt,
|
||||
};
|
||||
} catch (e) {
|
||||
logger.error(`Error while parsing Markdown frontmatter.
|
||||
This can happen if you use special characters in frontmatter values (try using double quotes around that value).`);
|
||||
logger.error(`Error while parsing Markdown front matter.
|
||||
This can happen if you use special characters in front matter values (try using double quotes around that value).`);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue