File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -555,7 +555,8 @@ export const QUERY = P.createLanguage<QueryLanguage>({
555555 queryLinked : ( q ) =>
556556 createFunction ( P . regexp ( / l i n k s t o | l i n k e d f r o m | c o n n e c t e d / i) . desc ( "connected" ) , q . query ) . map ( ( [ func , source ] ) => ( {
557557 type : "linked" ,
558- source,
558+ // When writing syntax like `linksto([[link]])`, [[link]] will also be interpreted as a linked query, so unwrap it if present.
559+ source : source . type == "linked" && source . source . type == "link" ? source . source : source ,
559560 direction :
560561 func . toLowerCase ( ) == "linksto" ? "incoming" : func . toLowerCase ( ) == "linkedfrom" ? "outgoing" : "both" ,
561562 } ) ) ,
Original file line number Diff line number Diff line change @@ -562,7 +562,7 @@ export class Datastore {
562562 if ( visited . has ( neighbor ) ) continue ;
563563
564564 visited . add ( neighbor ) ;
565- if ( dist < distance ) queue . push ( neighbor , dist + 1 ) ;
565+ if ( dist + 1 < distance ) queue . push ( neighbor , dist + 1 ) ;
566566 }
567567 }
568568
You can’t perform that action at this time.
0 commit comments