Skip to content

Commit c76e6c7

Browse files
committed
refactor: - add hardcoded include instruction
1 parent 726cdc7 commit c76e6c7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Scripting/QueryContext.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ export interface QueryContext {
2424
allTasks: Readonly<Task[]>;
2525
searchCache: Record<string, any>; // Added caching capability
2626
};
27+
include: {
28+
not_done: string;
29+
};
2730
}
2831

2932
/**
@@ -57,5 +60,8 @@ export function makeQueryContextWithTasks(tasksFile: TasksFile, allTasks: Readon
5760
allTasks: allTasks,
5861
searchCache: {}, // Added for caching
5962
},
63+
include: {
64+
not_done: 'not done',
65+
},
6066
};
6167
}

tests/Scripting/Includes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Query } from '../../src/Query/Query';
22
import { TasksFile } from '../../src/Scripting/TasksFile';
33

44
describe('include tests', () => {
5-
it.failing('should accept whole-line include placeholder', () => {
5+
it('should accept whole-line include placeholder', () => {
66
const source = '{{include.not_done}}';
77
const query = new Query(source, new TasksFile('stuff.md'));
88

0 commit comments

Comments
 (0)