Replace string.trimEnd with string.trimRight for Node 8.

This commit is contained in:
David Anson 2019-08-28 21:52:13 -07:00
parent a062e7c6bd
commit 84e972c72c

View file

@ -17,7 +17,7 @@ module.exports = {
const firstIndex = list.open.map[0];
if (!isBlankLine(lines[firstIndex - 1])) {
const line = lines[firstIndex];
const quotePrefix = line.match(quotePrefixRe)[0].trimEnd();
const quotePrefix = line.match(quotePrefixRe)[0].trimRight();
addErrorContext(
onError,
firstIndex + 1,
@ -32,7 +32,7 @@ module.exports = {
const lastIndex = list.lastLineIndex - 1;
if (!isBlankLine(lines[lastIndex + 1])) {
const line = lines[lastIndex];
const quotePrefix = line.match(quotePrefixRe)[0].trimEnd();
const quotePrefix = line.match(quotePrefixRe)[0].trimRight();
addErrorContext(
onError,
lastIndex + 1,