Skip to content

Commit

Permalink
0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Brenan committed Mar 23, 2021
1 parent ab3b2ae commit d7b068e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "dataview",
"name": "Dataview",
"version": "0.2.1",
"version": "0.2.2",
"minAppVersion": "0.10.13",
"description": "Complex data views for the data-obsessed.",
"author": "Michael Brenan <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-dataview",
"version": "0.2.1",
"version": "0.2.2",
"description": "Advanced data views for Obsidian.md.",
"main": "main.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const EXPRESSION = P.createLanguage<ExpressionLanguage>({
(_1, link, _2) => Sources.link(link, false)),
folderSource: q => q.string.map(str => Sources.folder(str)),
parensSource: q => P.seqMap(P.string("("), P.optWhitespace, q.source, P.optWhitespace, P.string(")"), (_1, _2, field, _3, _4) => field),
negateSource: q => P.seqMap(P.string("-"), q.atomSource, (_, source) => Sources.negate(source)),
negateSource: q => P.seqMap(P.alt(P.string("-"), P.string("!")), q.atomSource, (_, source) => Sources.negate(source)),
atomSource: q => P.alt<Source>(q.parensSource, q.negateSource, q.linkOutgoingSource, q.linkIncomingSource, q.folderSource, q.tagSource),
binaryOpSource: q => createBinaryParser(q.atomSource, q.binaryBooleanOp, Sources.binaryOp),
source: q => q.binaryOpSource,
Expand Down
2 changes: 2 additions & 0 deletions src/test/parse.expression.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ test("Parse simple sources", () => {

test("Parse negated source", () => {
expect(EXPRESSION.source.tryParse("-\"hello\"")).toEqual(Sources.negate(Sources.folder("hello")));
expect(EXPRESSION.source.tryParse("!\"hello\"")).toEqual(Sources.negate(Sources.folder("hello")));
expect(EXPRESSION.source.tryParse("-#neat")).toEqual(Sources.negate(Sources.tag("#neat")));
expect(EXPRESSION.source.tryParse("!#neat")).toEqual(Sources.negate(Sources.tag("#neat")));
});

test("Parse parens source", () => {
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
"0.1.10": "0.10.13",
"0.2.0": "0.10.13",
"": "0.10.13",
"0.2.1": "0.10.13"
"0.2.1": "0.10.13",
"0.2.2": "0.10.13"
}

0 comments on commit d7b068e

Please sign in to comment.