Skip to content

Commit

Permalink
better recognition for frontmatter according to Obsidian v1.3.3 Relea…
Browse files Browse the repository at this point in the history
…se Notes:

"Frontmatter will now still be recognized if there are spaces after the ending ---"
  • Loading branch information
yan42685 committed May 24, 2023
1 parent 0b585c7 commit 8cd7d89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8cd7d89

Please sign in to comment.