From 8cd7d8953252ff8131ba6fda7c4a824a123a368f Mon Sep 17 00:00:00 2001 From: alex <419725794@qq.com> Date: Wed, 24 May 2023 16:24:05 +0800 Subject: [PATCH] better recognition for frontmatter according to Obsidian v1.3.3 Release Notes: "Frontmatter will now still be recognized if there are spaces after the ending ---" --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index a2760a0d..4a788dee 100644 --- a/main.js +++ b/main.js @@ -1560,8 +1560,8 @@ class SmartConnectionsPlugin extends Obsidian.Plugin { if (limits.chars_per_line && line.length > limits.chars_per_line) { line = line.slice(0, limits.chars_per_line) + "..."; } - // if line is "---", skip - if (line === "---") { + // if line is "---" or there are spaces after "---", skip + if (line.trim() === "---") { // frontmatter ends if (is_frontmatter) { is_frontmatter = false;