brandonbloom / fipp

Fast Idiomatic Pretty Printer for Clojure
525 stars 44 forks source link

Passthru op #3

Closed micha closed 11 years ago

micha commented 11 years ago

The :pass op (usage: [:pass "foo" "bar" ...]) concatenates its arguments and passes them through the formatter verbatim (they do not affect width or formatting calculations). This is useful for adding zero-width ANSI escape codes to the printed output, for example.

brandonbloom commented 11 years ago

LGTM. Since you have some test code on the bottom, I'm going to assume you tried this with color directives too.

Now we just need to figure out how to improve the pretty print documents to allow attribues like color information to be properly transformed for serialization. Going to a hiccup like form with a vector of tag/attributes/children is probably the right direction, but I need to find some time to think about it.