File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 230
230
(= :h1 (-> selection first :tag )))))
231
231
(let [selection (select/select (select/find-in-text #"Div" ) htree)]
232
232
(is (and (= 1 (count selection))
233
- (= :div (-> selection first :tag ))))))
233
+ (= :div (-> selection first :tag )))))
234
+ (let [selection-locs (select/select-locs
235
+ (select/child (select/tag :body )
236
+ (select/find-in-text #"Paragraph" ))
237
+ htree)
238
+ selection (mapv zip/node selection-locs)]
239
+ (is (and (= 1 (count selection))
240
+ (= :p (-> selection first :tag ))
241
+ (= :body (-> selection-locs first zip/up zip/node :tag ))))))
234
242
(let [htree (hickory/as-hickory (hickory/parse html2))]
235
243
(let [selection (select/select (select/find-in-text #"Paragraph" ) htree)]
236
244
(is (and (= 8 (count selection))
You can’t perform that action at this time.
0 commit comments