Skip to content

Commit 9ea538b

Browse files
Mike Greinerclaude
andcommitted
fix: correct indentation and remove unrelated try/catch in postprocessor
Fix inconsistent indentation of the frontmatter.exists block to match surrounding code (16 spaces). Remove unrelated try/catch wrapper that was causing inconsistent indentation at the method boundary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9694dd0 commit 9ea538b

1 file changed

Lines changed: 17 additions & 24 deletions

File tree

src/main.ts

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,10 @@ export default class Tracker extends Plugin {
261261
el: HTMLElement,
262262
ctx: MarkdownPostProcessorContext
263263
) {
264-
try {
265-
// console.log("postprocess");
266-
const canvas = document.createElement("div");
264+
// console.log("postprocess");
265+
const canvas = document.createElement("div");
267266

268-
let yamlText = source.trim();
267+
let yamlText = source.trim();
269268

270269
// Replace all tabs by spaces
271270
let tabSize = this.app.vault.getConfig("tabSize");
@@ -538,20 +537,20 @@ export default class Tracker extends Plugin {
538537
} // console.log("Search frontmatter keys");
539538

540539
// console.log("Search frontmatter exists");
541-
if (
542-
fileCache &&
543-
query.getType() === SearchType.FrontmatterExists &&
544-
query.getTarget() !== "tags"
545-
) {
546-
let gotAnyValue = collecting.collectDataFromFrontmatterExists(
547-
fileCache,
548-
query,
549-
renderInfo,
550-
dataMap,
551-
xValueMap
552-
);
553-
processInfo.gotAnyValidYValue ||= gotAnyValue;
554-
} // console.log("Search frontmatter exists");
540+
if (
541+
fileCache &&
542+
query.getType() === SearchType.FrontmatterExists &&
543+
query.getTarget() !== "tags"
544+
) {
545+
let gotAnyValue = collecting.collectDataFromFrontmatterExists(
546+
fileCache,
547+
query,
548+
renderInfo,
549+
dataMap,
550+
xValueMap
551+
);
552+
processInfo.gotAnyValidYValue ||= gotAnyValue;
553+
} // console.log("Search frontmatter exists");
555554

556555
// console.log("Search wiki links");
557556
if (
@@ -787,12 +786,6 @@ export default class Tracker extends Plugin {
787786
}
788787

789788
el.appendChild(canvas);
790-
} catch (error) {
791-
console.error("TRACKER: ERROR in postprocessor:", error);
792-
console.error("TRACKER: Error stack:", error.stack);
793-
const canvas = document.createElement("div");
794-
return this.renderErrorMessage("Error: " + error.message, canvas, el);
795-
}
796789
}
797790

798791
// TODO: remove this.app and move to collecting.ts

0 commit comments

Comments
 (0)