Skip to content

Commit 4764eff

Browse files
authored
Merge pull request #3517 from obsidian-tasks-group/obsidian-1.9.4-parsing
test: Save the parsing diffs from Obsidian 1.9.2 to 1.9.4
2 parents 264c10c + 88d18ed commit 4764eff

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

tests/Obsidian/__test_data__/jason_properties.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@
121121
"fileContents": "---\n{\n \"tags\": \"journal\",\n \"publish\": false\n}\n---\n\n# jason_properties\n\n- [ ] #task Task in 'jason_properties'\n",
122122
"filePath": "Test Data/jason_properties.md",
123123
"getAllTags": [
124+
"#journal",
124125
"#task"
125126
],
126-
"parseFrontMatterTags": null
127+
"parseFrontMatterTags": [
128+
"#journal"
129+
]
127130
}

tests/Obsidian/__test_data__/yaml_tags_had_value_then_was_emptied_by_obsidian.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,5 @@
122122
"getAllTags": [
123123
"#task"
124124
],
125-
"parseFrontMatterTags": null
125+
"parseFrontMatterTags": []
126126
}

tests/Obsidian/__test_data__/yaml_tags_is_empty_list.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,5 @@
122122
"getAllTags": [
123123
"#task"
124124
],
125-
"parseFrontMatterTags": null
125+
"parseFrontMatterTags": []
126126
}

tests/Obsidian/__test_data__/yaml_tags_with_one_value_on_single_line.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@
120120
"fileContents": "---\ntags: single-value-single-line\n---\n\n# yaml_tags_with_one_value_on_single_line\n\n- [ ] #task Task in 'yaml_tags_with_one_value_on_single_line'\n",
121121
"filePath": "Test Data/yaml_tags_with_one_value_on_single_line.md",
122122
"getAllTags": [
123+
"#single-value-single-line",
123124
"#task"
124125
],
125-
"parseFrontMatterTags": null
126+
"parseFrontMatterTags": [
127+
"#single-value-single-line"
128+
]
126129
}

tests/Obsidian/__test_data__/yaml_tags_with_two_values_on_one_line.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,5 @@
122122
"getAllTags": [
123123
"#task"
124124
],
125-
"parseFrontMatterTags": null
125+
"parseFrontMatterTags": []
126126
}

tests/Scripting/TasksFile.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ describe('TasksFile - reading frontmatter', () => {
179179
// ["#journal"]
180180
// Obsidian 1.9.0 to 1.9.2 reads this as an empty array:
181181
// []
182-
expect(tasksFile.frontmatter.tags).toEqual([]);
182+
// Obsidian 1.9.4 again reads this as an array:
183+
// ["#journal"]
184+
expect(tasksFile.frontmatter.tags).toEqual(['#journal']);
183185
expect(tasksFile.frontmatter.publish).toEqual(false);
184186
});
185187

0 commit comments

Comments
 (0)