aboutsummaryrefslogtreecommitdiff
path: root/Driver/HTMLPrint.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-03-19 05:07:26 +0000
committerTed Kremenek <kremenek@apple.com>2008-03-19 05:07:26 +0000
commitd6c1360c2bf234c73572a865f119d0518aca8154 (patch)
tree8e752d3708d1321bd3fab74280471cd4c2128171 /Driver/HTMLPrint.cpp
parent329f0f5df1a4b45740312a53b8d01e32a76c91a5 (diff)
More cleanups to the HTML rewriter (with line formatting), with better
pretty-printing of line numbers. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/HTMLPrint.cpp')
-rw-r--r--Driver/HTMLPrint.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/Driver/HTMLPrint.cpp b/Driver/HTMLPrint.cpp
index acb011c216..93e544fc96 100644
--- a/Driver/HTMLPrint.cpp
+++ b/Driver/HTMLPrint.cpp
@@ -57,14 +57,21 @@ HTMLPrinter::~HTMLPrinter() {
std::ostringstream os;
os << "<html>\n<head>\n"
- << " <style type=\"text/css\">\n"
- << " .nums, .lines { vertical-align:top }\n"
- << " .nums { padding-right:.5em; width:2.5em }\n"
+ << " <style type=\"text/css\">\n"
+ << " .codeblock { width:100% }\n"
+ << " .codeline { font-family: \"Monaco\", fixed; font-size:11pt }\n"
+ << " .codeline { height:1.5em; line-height:1.5em }\n"
+ << " .nums, .lines { float:left; height:100% }\n"
+ << " .nums { background-color: #eeeeee }\n"
+ << " .nums { font-family: \"Andale Mono\", fixed; font-size:smaller }\n"
+ << " .nums { width:2.5em; padding-right:2ex; text-align:right }\n"
+ << " .lines { padding-left: 1ex; border-left: 3px solid #ccc }\n"
+ << " .lines { white-space: pre }\n"
<< " </style>\n"
<< "</head>\n"
- << "<body>\n<pre>";
+ << "<body>";
- R.InsertTextBefore(StartLoc, os.str().c_str(), os.str().size());
+ R.InsertStrBefore(StartLoc, os.str());
}
// Generate footer
@@ -72,8 +79,8 @@ HTMLPrinter::~HTMLPrinter() {
{
std::ostringstream os;
- os << "</pre>\n</body></html>\n";
- R.InsertTextAfter(EndLoc, os.str().c_str(), os.str().size());
+ os << "</body></html>\n";
+ R.InsertStrAfter(EndLoc, os.str());
}