-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cemerick proposal + readme #130
base: master
Are you sure you want to change the base?
Conversation
@@ -992,7 +992,7 @@ | |||
(defn- nodify [node-spec] | |||
(cond | |||
(string? node-spec) node-spec | |||
(vector? node-spec) | |||
(and (vector? node-spec) (not (map? (first node-spec)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than (not (map? (first node-spec)))
, (keyword? (first node-spec))
seems to better handle cases such as ["abc" {:tag :b :content ["def"]} "ghi"]
. Doesn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Been thinking and trying, but I can't figure out what you mean 8-°
That would give us:
(html (at (html [:a])
[:a] (content "foo")))
=> ({:tag ::a, :attrs {}, :content ()})
which can't be what you want?
Plus:
Ran 30 tests containing 104 assertions. 6 failures, 0 errors. {:test 30, :pass 98, :fail 6, :error 0, :type :summary}
No description provided.