code.doc.parse.check

attribute?

added in 3.0

(attribute? nav)

check if element is an attribute

(attribute? (nav/parse-string “{:title "hello"}”)) => true

code-directive?

added in 3.0

(code-directive? nav)

check if element is a code directive

(code-directive? (nav/parse-string “:code {:lang "python"} "1 + 1"”)) => true

comment?

added in 3.0

(comment? nav)

check if element is a comment form

(comment? (nav/parse-string “(comment 1 => 1)”)) => true

deftest?

added in 3.0

(deftest? nav)

check if element is a deftest form

(deftest? (nav/parse-string “(deftest …)”)) => true

directive?

added in 3.0

(directive? nav)(directive? nav kw)

check if element is a directive

(directive? (nav/parse-string “:chapter {:title "hello"}”)) => true

directives

fact?

added in 3.0

(fact? nav)

check if element is a fact form

(fact? (nav/parse-string “(fact 1 => 1)”)) => true

facts?

added in 3.0

(facts? nav)

check if element is a facts form

(facts? (nav/parse-string “(facts 1 => 1)”)) => true

is?

added in 3.0

(is? nav)

check if element is an is form

(is? (nav/parse-string “(is …)”)) => true

ns?

added in 3.0

(ns? nav)

check if element is a ns form

(ns? (nav/parse-string “(ns code.manage)”)) => true

paragraph?

added in 3.0

(paragraph? nav)

check if element is a paragraph (string)

(paragraph? (nav/parse-string “"hello world"”)) => true

whitespace?

added in 3.0

(whitespace? nav)

check if element is whitespace

(whitespace? (nav/parse-string " ")) => true

wrap-meta

added in 3.0

(wrap-meta f)

helper function for navigating ^:meta tags

((wrap-meta query/match) (nav/parse-string “^:hello ()”) list?) => true