Skip to content

Commit

Permalink
feat: Replace string.replaceAll call with string.replace
Browse files Browse the repository at this point in the history
In preparation to support lower node versions.

Relates to: #20
  • Loading branch information
pklaschka committed Jan 18, 2021
1 parent 4041fc0 commit e970fb1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/themes/html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ const viewFolder = path.resolve(__dirname, '..', '..', '..', 'views');
*/
const md = {
render: (md?: string) => {
return origMd.render(
(md ?? '').replaceAll(/{@link (.*?)}/g, '[`$1`](#$1)')
);
return origMd.render((md ?? '').replace(/{@link (.*?)}/g, '[`$1`](#$1)'));
}
};

Expand Down

2 comments on commit e970fb1

@rxliuli
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I did not notice this submission. . .

@pklaschka
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I did not notice this submission. . .

No problem, thank you for your contributions.

Please sign in to comment.