Skip to content

Commit

Permalink
parseでのキャッシュ再利用化
Browse files Browse the repository at this point in the history
  • Loading branch information
r74tech committed Nov 1, 2023
1 parent 9eea999 commit 7e43792
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/script/include.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export class TextWikiParseInclude {
}

async parse(): Promise<void> {
this.updateIncludedPages(); // 引数なしで呼び出し
await this.checkForNewIncludes();
// this.saveIncludedPagesToLocalStorage();

let level = 0;
let oldSource;
do {
Expand Down Expand Up @@ -119,9 +123,6 @@ export class TextWikiParseInclude {
const source = (event.target as HTMLTextAreaElement).value;
// console.log('Source changed:', source);
this.wiki.source = source; // クラス内のwiki.sourceを更新
this.updateIncludedPages(); // 引数なしで呼び出し
await this.checkForNewIncludes();
this.saveIncludedPagesToLocalStorage();

// paese()を呼び出し、wiki.sourceを更新
await this.parse();
Expand Down

0 comments on commit 7e43792

Please sign in to comment.