diff --git a/src/components/Support/Support.jsx b/src/components/Support/Support.jsx index 4a0ce57b648a..0642933c6544 100644 --- a/src/components/Support/Support.jsx +++ b/src/components/Support/Support.jsx @@ -85,7 +85,7 @@ function formatMoney(number) { let str = Math.round(number) + ''; if (str.length > 3) { - str = str.substr(0, str.length - 3) + ',' + str.substr(-3); + str = str.slice(0, -3) + ',' + str.slice(-3); } return str; } diff --git a/src/remark-plugins/remark-custom-asides/index.mjs b/src/remark-plugins/remark-custom-asides/index.mjs index e63990b0c6e9..96e7c43c808b 100644 --- a/src/remark-plugins/remark-custom-asides/index.mjs +++ b/src/remark-plugins/remark-custom-asides/index.mjs @@ -20,7 +20,7 @@ export default function customAsides( if (!textNode) return; // looking for mapping in the beginning - const className = mapping[textNode.substr(0, 2)]; + const className = mapping[textNode.slice(0, 2)]; // >This is a joke <- ignore this // >T hi there const hasPostfixWhitespace = textNode.indexOf(' ') === 2;