diff --git a/lib/help.js b/lib/help.js index eb4d2064b..17a2bf83c 100644 --- a/lib/help.js +++ b/lib/help.js @@ -387,8 +387,8 @@ class Help { const columnWidth = width - indent; if (columnWidth < minColumnWidth) return str; - const leadingStr = str.substr(0, indent); - const columnText = str.substr(indent); + const leadingStr = str.slice(0, indent); + const columnText = str.slice(indent); const indentString = ' '.repeat(indent); const regex = new RegExp('.{1,' + (columnWidth - 1) + '}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)', 'g');