Skip to content

Commit

Permalink
fix(core): check new lines are replaced in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jul 2, 2024
1 parent 766606a commit 3e7dc6c
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 66 deletions.
1 change: 0 additions & 1 deletion packages/typedoc-plugin-markdown/src/libs/utils/_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export * from './format-table-cell';
export * from './get-file-name-with-extension';
export * from './index';
export * from './is-quoted';
export * from './normalize-line-breaks';
export * from './remove-first-scoped-directory';
export * from './remove-line-breaks';
export * from './sanitize-comments';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
export function formatTableCell(str: string) {
return str
.replace(/\n/g, ' ')
.replace(/\r?\n/g, ' ')
.replace(
/```(\w+\s)?([\s\S]*?)```/gs,
(match, p1, p2) => `\`${p2.trim()}\``,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function removeLineBreaks(str: string) {
return str?.replace(/\n/g, ' ').replace(/ {2,}/g, ' ');
return str?.replace(/\r?\n/g, ' ').replace(/ {2,}/g, ' ');
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function getDescriptionForReflection(
return this.helpers
.getCommentParts(comment.summary)
?.split('\n\n')[0]
.replace(/\n/g, ' ');
.replace(/\r?\n/g, ' ');
}
return null;
}

0 comments on commit 3e7dc6c

Please sign in to comment.