Compare commits

...

2 commits

Author SHA1 Message Date
L7Cy
0cb10eb8dc 4.6.1 2023-10-23 12:15:37 +09:00
L7Cy
6172371b21 showUntilRegexに変更 2023-10-23 12:14:50 +09:00
6 changed files with 12 additions and 12 deletions

View file

@ -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",

View file

@ -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",

View file

@ -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": {

View file

@ -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(', ')

View file

@ -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;
}

View file

@ -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() {