Skip to content

Commit

Permalink
agora vai
Browse files Browse the repository at this point in the history
  • Loading branch information
vasfvitor committed Mar 9, 2024
1 parent 1aec253 commit 26553ce
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions packages/releases-generator/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,22 +165,24 @@ async function generator() {
}

function entitify(str: string): string {
return str.replace(/[&<>"']/g, function (entity) {
switch (entity) {
case '&':
return '&amp;';
case '<':
return '&lt;';
case '>':
return '&gt;';
case '"':
return '&quot;';
case "'":
return '&#39;';
default:
return entity;
}
});
return str
.replace(/[&<>"']/g, function (entity) {
switch (entity) {
case '&':
return '&amp;';
case '<':
return '&lt;';
case '>':
return '&gt;';
case '"':
return '&quot;';
case "'":
return '&#39;';
default:
return entity;
}
})
.replace(/\${/g, '$\{');
}

generator();

0 comments on commit 26553ce

Please sign in to comment.