Skip to content

Commit

Permalink
use raw string literals
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed May 14, 2024
1 parent e160474 commit 796a94d
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 54 deletions.
44 changes: 22 additions & 22 deletions src/lib/writer-html.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,28 @@ namespace HtmlLib {
void initHtml(std::ostream &str, std::string title) {
escapeText(title);

str << "<!DOCTYPE html>\n\
<html>\n\
<head>\n\
<title>" << title << "</title>\n\
<style>\n\
body { background-color: white; }\n\
pre { white-space: pre-wrap; }\n\
.checker { background:#C0FF00; }\n\
.ctxLine { color:#000000; }\n\
.infoEvent { color:#808080; }\n\
.infoEventComment { color:#00C0C0; }\n\
.traceEvent { color: #C0C0C0; }\n\
.newDefect { color: #00FF00; }\n\
.parseWarning { color: #FF0000; }\n\
.impFlag { color: #FF0000; font-weight: bold; }\n\
#scanProps { font-family: monospace; }\n\
.oddRow { background-color: #EEE; }\n\
.scanPropName { padding-right: 8px; white-space: nowrap; }\n\
</style>\n\
</head>\n\
<body>\n<h1>"
<< title << "</h1>\n";
str << R"(<!DOCTYPE html>
<html>
<head>
<title>)" << title << R"(</title>
<style>
body { background-color: white; }
pre { white-space: pre-wrap; }
.checker { background:#C0FF00; }
.ctxLine { color:#000000; }
.infoEvent { color:#808080; }
.infoEventComment { color:#00C0C0; }
.traceEvent { color: #C0C0C0; }
.newDefect { color: #00FF00; }
.parseWarning { color: #FF0000; }
.impFlag { color: #FF0000; font-weight: bold; }
#scanProps { font-family: monospace; }
.oddRow { background-color: #EEE; }
.scanPropName { padding-right: 8px; white-space: nowrap; }
</style>
</head>
<body>
<h1>)" << title << "</h1>\n";
}

void writeLink(
Expand Down
32 changes: 16 additions & 16 deletions tests/cshtml/0001-smoke/scan-results.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>curl-7.60.0-1.el8+7</title>
<style>
body { background-color: white; }
pre { white-space: pre-wrap; }
.checker { background:#C0FF00; }
.ctxLine { color:#000000; }
.infoEvent { color:#808080; }
.infoEventComment { color:#00C0C0; }
.traceEvent { color: #C0C0C0; }
.newDefect { color: #00FF00; }
.parseWarning { color: #FF0000; }
.impFlag { color: #FF0000; font-weight: bold; }
#scanProps { font-family: monospace; }
.oddRow { background-color: #EEE; }
.scanPropName { padding-right: 8px; white-space: nowrap; }
</style>
<title>curl-7.60.0-1.el8+7</title>
<style>
body { background-color: white; }
pre { white-space: pre-wrap; }
.checker { background:#C0FF00; }
.ctxLine { color:#000000; }
.infoEvent { color:#808080; }
.infoEventComment { color:#00C0C0; }
.traceEvent { color: #C0C0C0; }
.newDefect { color: #00FF00; }
.parseWarning { color: #FF0000; }
.impFlag { color: #FF0000; font-weight: bold; }
#scanProps { font-family: monospace; }
.oddRow { background-color: #EEE; }
.scanPropName { padding-right: 8px; white-space: nowrap; }
</style>
</head>
<body>
<h1>curl-7.60.0-1.el8+7</h1>
Expand Down
32 changes: 16 additions & 16 deletions tests/cshtml/0002-cwe-names/scan-results.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>curl-7.60.0-1.el8+7</title>
<style>
body { background-color: white; }
pre { white-space: pre-wrap; }
.checker { background:#C0FF00; }
.ctxLine { color:#000000; }
.infoEvent { color:#808080; }
.infoEventComment { color:#00C0C0; }
.traceEvent { color: #C0C0C0; }
.newDefect { color: #00FF00; }
.parseWarning { color: #FF0000; }
.impFlag { color: #FF0000; font-weight: bold; }
#scanProps { font-family: monospace; }
.oddRow { background-color: #EEE; }
.scanPropName { padding-right: 8px; white-space: nowrap; }
</style>
<title>curl-7.60.0-1.el8+7</title>
<style>
body { background-color: white; }
pre { white-space: pre-wrap; }
.checker { background:#C0FF00; }
.ctxLine { color:#000000; }
.infoEvent { color:#808080; }
.infoEventComment { color:#00C0C0; }
.traceEvent { color: #C0C0C0; }
.newDefect { color: #00FF00; }
.parseWarning { color: #FF0000; }
.impFlag { color: #FF0000; font-weight: bold; }
#scanProps { font-family: monospace; }
.oddRow { background-color: #EEE; }
.scanPropName { padding-right: 8px; white-space: nowrap; }
</style>
</head>
<body>
<h1>curl-7.60.0-1.el8+7</h1>
Expand Down

0 comments on commit 796a94d

Please sign in to comment.