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:
parent
9e8970dab7
commit
2629f908a5
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue