Skip to content

Commit e9512a0

Browse files
committed
refactor: Remove method canCreateGrouperForLine()
It only created duplicate calls to methods which were already been called by createGrouperFromLine(), so added new value. And it was not even called in the tests.
1 parent 650cd22 commit e9512a0

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/Query/Filter/Field.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -275,30 +275,9 @@ export abstract class Field {
275275
return null;
276276
}
277277

278-
if (!this.canCreateGrouperForLine(line)) {
279-
return null;
280-
}
281-
282278
return this.createGrouperFromLine(line);
283279
}
284280

285-
/**
286-
* Returns true if the class can parse the given 'group by' instruction line.
287-
*
288-
* Current implementation simply checks whether the class does support grouping,
289-
* and whether the line matches this.grouperRegExp().
290-
* @param line - A line from a ```tasks``` block.
291-
*
292-
* @see {@link createGrouperFromLine}
293-
*/
294-
public canCreateGrouperForLine(line: string): boolean {
295-
if (!this.supportsGrouping()) {
296-
return false;
297-
}
298-
299-
return Field.lineMatchesFilter(this.grouperRegExp(), line);
300-
}
301-
302281
/**
303282
* Parse the line, and return either a {@link Grouper} object or null.
304283
*
@@ -309,8 +288,6 @@ export abstract class Field {
309288
* this method.
310289
*
311290
* @param line - A 'group by' line from a ```tasks``` block.
312-
*
313-
* @see {@link canCreateGrouperForLine}
314291
*/
315292
public createGrouperFromLine(line: string): Grouper | null {
316293
if (!this.supportsGrouping()) {

0 commit comments

Comments
 (0)