Skip to content

Commit

Permalink
Ignore whitespace before frontmatter
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeby committed Jul 7, 2021
1 parent 73d1b58 commit 709d600
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "tag-wrangler",
"name": "Tag Wrangler",
"version": "0.4.4",
"minAppVersion": "0.11.13",
"version": "0.4.5",
"minAppVersion": "0.12.5",
"description": "Rename, merge, toggle, and search tags from the tag pane",
"isDesktopOnly": true
}
2 changes: 1 addition & 1 deletion src/File.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class File {
const [empty, frontMatter] = text.split(/^---\r?$\n?/m, 2);

// Check for valid, non-empty, properly terminated front matter
if (empty !== "" || !frontMatter.trim() || !frontMatter.endsWith("\n"))
if (empty.trim() !== "" || !frontMatter.trim() || !frontMatter.endsWith("\n"))
return text;

const parsed = parseDocument(frontMatter);
Expand Down
2 changes: 1 addition & 1 deletion src/Tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export class Replacement {
this.inArray = (tags, skipOdd) => {
return tags.map((t, i) => {
if (skipOdd && (i & 1)) return t; // leave odd entries (separators) alone
if (cache[t]) return cache[t];
if (!t) return t;
if (cache[t]) return cache[t];
const lc = t.toLowerCase();
if (cache[lc]) {
return cache[t] = cache[lc];
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"0.4.2": "0.11.13",
"0.4.5": "0.12.5",
"0.4.4": "0.11.13",
"0.4.1": "0.11.5",
"0.3.2": "0.10.13",
"0.2.3": "0.10.11"
Expand Down

0 comments on commit 709d600

Please sign in to comment.