Raynes / laser

HTML transformation/templating for people who do that sort of thing and stuff
120 stars 16 forks source link

Merging at the top level of fragments is kinda broken #2

Closed Raynes closed 11 years ago

Raynes commented 11 years ago

It works in cases where you're only generating nodes in one transformer, but not more than one, and it only works if the transformer generating those nodes is the last selector/transformer pair in the fragment. We can fix this with a mildly more complex reduce function.

We have a bit of a problem to think about though. If you have transformer x and transformer y that both match node a and selector for x matches first and returns a seq, what does selector for y try to match on? The original node is either gone or mixed in with a bunch of other nodes at this point.

Raynes commented 11 years ago

Should test with Enlive and see how it does things.