From 1ee8d6ffabdec9288dbc87773913fde5e2938772 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 17 Apr 2008 22:24:51 +0000 Subject: [PATCH] Handle text escaping (e.g. & -> &) last, to avoid interactions between 'replace' operations and insert operations. This fixes a problem with "&;&" on line 666 of the gcc.c example I sent out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49874 91177308-0d34-0410-b5e6-96231b3b80d8 --- Driver/HTMLPrint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Driver/HTMLPrint.cpp b/Driver/HTMLPrint.cpp index 54678dea3e..ff04b0e609 100644 --- a/Driver/HTMLPrint.cpp +++ b/Driver/HTMLPrint.cpp @@ -55,7 +55,6 @@ HTMLPrinter::~HTMLPrinter() { // Format the file. unsigned FileID = R.getSourceMgr().getMainFileID(); - html::EscapeText(R, FileID, false, true); html::AddLineNumbers(R, FileID); html::AddHeaderFooterInternalBuiltinCSS(R, FileID); @@ -67,6 +66,7 @@ HTMLPrinter::~HTMLPrinter() { html::SyntaxHighlight(R, FileID, *PP); html::HighlightMacros(R, FileID, *PP); } + html::EscapeText(R, FileID, false, true); // Open the output. -- 2.40.0