mirror of
https://github.com/l7cy/obsidian-dynamic-timetable.git
synced 2026-07-22 07:40:29 +00:00
Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cb10eb8dc | ||
|
|
6172371b21 |
6 changed files with 12 additions and 12 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "dynamic-timetable",
|
||||
"name": "Dynamic Timetable",
|
||||
"version": "4.6.0",
|
||||
"version": "4.6.1",
|
||||
"minAppVersion": "1.2.8",
|
||||
"description": "Calculate the estimated time of completion from the estimated time of the task and dynamically create a timetable.",
|
||||
"author": "L7Cy",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "dynamic-timetable",
|
||||
"name": "Dynamic Timetable",
|
||||
"version": "4.6.0",
|
||||
"version": "4.6.1",
|
||||
"minAppVersion": "1.2.8",
|
||||
"description": "Calculate the estimated time of completion from the estimated time of the task and dynamically create a timetable.",
|
||||
"author": "L7Cy",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "dynamic-timetable",
|
||||
"version": "4.6.0",
|
||||
"version": "4.6.1",
|
||||
"description": "Calculate the estimated time of completion from the estimated time of the task and dynamically create a timetable.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export class DynamicTimetableSettingTab extends PluginSettingTab {
|
|||
this.createTextSetting(
|
||||
'Show Until Regex',
|
||||
'showUntilRegex',
|
||||
'Enter a regex. Tasks will be shown until a line matching this regex is found.',
|
||||
'Enter a regex. Tasks will be shown until a line matching this regex is found.'
|
||||
);
|
||||
const headerNames = Array.isArray(this.plugin.settings.headerNames)
|
||||
? this.plugin.settings.headerNames.join(', ')
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export interface Task {
|
|||
|
||||
export class TaskParser {
|
||||
private dateDelimiter: RegExp;
|
||||
private parseUntilRegex: RegExp;
|
||||
private showUntilRegex: RegExp;
|
||||
|
||||
constructor(
|
||||
private separator: string,
|
||||
|
|
@ -22,11 +22,11 @@ export class TaskParser {
|
|||
private showStartTimeInTaskName: boolean,
|
||||
private showEstimateInTaskName: boolean,
|
||||
private showCategoryNamesInTask: boolean,
|
||||
parseUntilRegex: string
|
||||
showUntilRegex: string
|
||||
) {
|
||||
this.dateDelimiter = dateDelimiter ? new RegExp(dateDelimiter) : /(?!x)x/;
|
||||
this.parseUntilRegex = parseUntilRegex
|
||||
? new RegExp(parseUntilRegex)
|
||||
this.showUntilRegex = showUntilRegex
|
||||
? new RegExp(showUntilRegex)
|
||||
: /(?!x)x/;
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ export class TaskParser {
|
|||
settings.showStartTimeInTaskName,
|
||||
settings.showEstimateInTaskName,
|
||||
settings.showCategoryNamesInTask,
|
||||
settings.parseUntilRegex
|
||||
settings.showUntilRegex
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ export class TaskParser {
|
|||
}
|
||||
return acc;
|
||||
}
|
||||
if (this.parseUntilRegex.test(task)) {
|
||||
if (this.showUntilRegex.test(task)) {
|
||||
stopParsing = true;
|
||||
return acc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export interface DynamicTimetableSettings {
|
|||
pathToDictionary: string;
|
||||
showRemainingTime: boolean;
|
||||
customUrlScheme: string;
|
||||
parseUntilRegex: string;
|
||||
showUntilRegex: string;
|
||||
[key: string]:
|
||||
| string
|
||||
| boolean
|
||||
|
|
@ -75,7 +75,7 @@ export default class DynamicTimetable extends Plugin {
|
|||
pathToDictionary: '',
|
||||
showRemainingTime: true,
|
||||
customUrlScheme: '',
|
||||
parseUntilRegex: '',
|
||||
showUntilRegex: '',
|
||||
};
|
||||
|
||||
async onload() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue