diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-03-19 05:07:26 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-03-19 05:07:26 +0000 |
commit | 3f8392626b558e5714ccb68d244fe92efee627b9 (patch) | |
tree | 5d74c0664930375246a0e31192bf86dd86e41958 /clang/Driver/HTMLPrint.cpp | |
parent | d900897bb0b5e0bf7e6156f116fa4b5306cb8136 (diff) | |
download | bcm5719-llvm-3f8392626b558e5714ccb68d244fe92efee627b9.tar.gz bcm5719-llvm-3f8392626b558e5714ccb68d244fe92efee627b9.zip |
More cleanups to the HTML rewriter (with line formatting), with better
pretty-printing of line numbers.
llvm-svn: 48533
Diffstat (limited to 'clang/Driver/HTMLPrint.cpp')
-rw-r--r-- | clang/Driver/HTMLPrint.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/clang/Driver/HTMLPrint.cpp b/clang/Driver/HTMLPrint.cpp index acb011c2160..93e544fc966 100644 --- a/clang/Driver/HTMLPrint.cpp +++ b/clang/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()); } |