Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
fix(parser): fix newline
Browse files Browse the repository at this point in the history
  • Loading branch information
r4zendev committed Dec 22, 2023
1 parent 074eaf0 commit dc74cb7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions readme-parser/parse.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ describe('parse/yaml', function () {
'This is an amazing codemod which does `the thing`\n\n### WARNING\n\nThis codemod does the thing\n' +
'Following the original msw [upgrade guide](https://mswjs.io/docs/migrations/1.x-to-2.x/#imports), ' +
'there are certain imports that changed their location and/or naming. This codemod will adjust your imports to the new location and naming.\n' +
'- `setupWorker` is now imported from `msw/browser`\n' +
'- `rest` from `msw` is now named `http`\n' +
'- `RestHandler` from `msw` is now named `HttpHandler`',
' - `setupWorker` is now imported from `msw/browser`\n' +
' - `rest` from `msw` is now named `http`\n' +
' - `RestHandler` from `msw` is now named `HttpHandler`',
examples:
'\n### `tsconfig.json`\n\n' +
'### Before\n\n' +
Expand Down Expand Up @@ -177,9 +177,9 @@ f_long-description: >-
This codemod does the thing
Following the original msw [upgrade guide](https://mswjs.io/docs/migrations/1.x-to-2.x/#imports), there are certain imports that changed their location and/or naming. This codemod will adjust your imports to the new location and naming.
- \`setupWorker\` is now imported from \`msw/browser\`
- \`rest\` from \`msw\` is now named \`http\`
- \`RestHandler\` from \`msw\` is now named \`HttpHandler\`
- \`setupWorker\` is now imported from \`msw/browser\`
- \`rest\` from \`msw\` is now named \`http\`
- \`RestHandler\` from \`msw\` is now named \`HttpHandler\`
Expand Down
2 changes: 1 addition & 1 deletion readme-parser/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const getTextByHeader = (

if (child.type === 'listItem') {
if (isDescription) {
return `- ${getTextFromNode(
return ` - ${getTextFromNode(
child.children[0] ?? null,
true,
)}${delimiter}`;
Expand Down
2 changes: 1 addition & 1 deletion readme-parser/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export const sync = async () => {
}

const websiteLeftoverDescription = websiteContentSplit.at(2)?.trim();
updatedYaml = `---\n${updatedYaml}---\n${
updatedYaml = `---\n${updatedYaml}\n---\n${
websiteLeftoverDescription ?? newFileShortDescription
}`;

Expand Down

0 comments on commit dc74cb7

Please sign in to comment.