|  | @@ -248,18 +248,17 @@
 | 
	
		
			
				|  |  |    (reset! *swipe nil))
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  (defn get-blocks-refed-pages
 | 
	
		
			
				|  |  | -  [aliases ref-blocks]
 | 
	
		
			
				|  |  | -  (let [refs (->> (mapcat :block/refs ref-blocks)
 | 
	
		
			
				|  |  | -                  (remove #(aliases (:db/id %))))
 | 
	
		
			
				|  |  | -        pages (->> (map :block/page ref-blocks)
 | 
	
		
			
				|  |  | -                   (distinct)
 | 
	
		
			
				|  |  | -                   (remove #(aliases (:db/id %))))
 | 
	
		
			
				|  |  | -        all-refs (concat pages refs)]
 | 
	
		
			
				|  |  | +  [aliases [block & children]]
 | 
	
		
			
				|  |  | +  (let [children-refs (mapcat :block/refs children)
 | 
	
		
			
				|  |  | +        refs (->>
 | 
	
		
			
				|  |  | +              (:block/path-refs block)
 | 
	
		
			
				|  |  | +              (concat children-refs)
 | 
	
		
			
				|  |  | +              (remove #(aliases (:db/id %))))]
 | 
	
		
			
				|  |  |      (keep (fn [ref]
 | 
	
		
			
				|  |  |              (when (:block/name ref)
 | 
	
		
			
				|  |  |                {:db/id (:db/id ref)
 | 
	
		
			
				|  |  |                 :block/name (:block/name ref)
 | 
	
		
			
				|  |  | -               :block/original-name (:block/original-name ref)})) all-refs)))
 | 
	
		
			
				|  |  | +               :block/original-name (:block/original-name ref)})) refs)))
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  (defn filter-blocks
 | 
	
		
			
				|  |  |    [ref-blocks filters]
 |