Skip to content

Commit 6adc720

Browse files
committed
center-endpath-html.patch
1 parent 09f00b8 commit 6adc720

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

clang/lib/Rewrite/HTMLRewrite.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ h1 { font-size:14pt }
334334
.keyword { color: blue }
335335
.string_literal { color: red }
336336
.directive { color: darkmagenta }
337+
.anchor { display: block; height: 250px; margin-top: -250px; visibility: hidden; }
337338
338339
/* Macros and variables could have pop-up notes hidden by default.
339340
- Macro pop-up: expansion of the macro

clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,10 @@ void HTMLDiagnostics::HandlePiece(Rewriter &R, FileID BugFileID,
945945
std::string sbuf;
946946
llvm::raw_string_ostream os(sbuf);
947947

948+
// This creates a hidden entry so #EndPath is centered on the page when linked
949+
if (num == max)
950+
os << "\n<tr class=\"anchor\" id=\"EndPath\"></tr>";
951+
948952
os << "\n<tr><td class=\"num\"></td><td class=\"line\"><div id=\"";
949953

950954
if (IsNote)

0 commit comments

Comments
 (0)