preston/railroady — pull request #34 by peterhoeg (2012-09-07 09:17:03+00:00)
Title: use sed to strip ansi codes from railroady output

For some odd reason railroady adds an ansi colour code (specfifically [[0m) at the end of its output causing dot and neato to choke.

This is not the clever way of solving the problem, but it works - basically sed is invoked on the output to strip any ansi codes before passing on the data to dot/neato.

If I don't use this, railroady will crash with:

Error: :0: syntax error near line 0
context: >>> Warning: :0: ambiguous "0m" splits into two names: "0" and "m"

FYI, this works with GNU sed version 4.2.1.