Report Sass errors better.

Actually insert Sass error reports into the document
using the content attribute of a body:before selector.
This commit is contained in:
Nathan Weizenbaum 2008-04-18 13:59:47 -07:00
parent 9e8970dab7
commit 2629f908a5
1 changed files with 12 additions and 1 deletions

View File

@ -104,7 +104,18 @@ module Sass
end end
end end
end end
"/*\n#{e_string}\n\nBacktrace:\n#{e.backtrace.join("\n")}\n*/" <<END
/*
#{e_string}
Backtrace:\n#{e.backtrace.join("\n")}
*/
body:before {
white-space: pre;
font-family: monospace;
content: "#{e_string.gsub('"', '\"').gsub("\n", '\\A ')}"; }
END
# Fix an emacs syntax-highlighting hiccup: '
else else
"/* Internal stylesheet error */" "/* Internal stylesheet error */"
end end