Merge pull request #333 from matthiaskrgr/htmlreport_fix_colors
htmlreport: fix syntax highlighting broken in ca4a0af840
This commit is contained in:
commit
0ec59f5630
|
@ -21,10 +21,17 @@ with syntax highlighted source code.
|
|||
|
||||
STYLE_FILE = """
|
||||
body {
|
||||
background-color: black;
|
||||
font: 13px Arial, Verdana, Sans-Serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#footer > p {
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.error {
|
||||
|
@ -42,18 +49,6 @@ body {
|
|||
padding: 1px;
|
||||
}
|
||||
|
||||
#page {
|
||||
background-color: white;
|
||||
border: 2px solid #aaa;
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
margin: 10px;
|
||||
overflow: auto;
|
||||
padding: 5px 10px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#header {
|
||||
border-bottom: thin solid #aaa;
|
||||
}
|
||||
|
@ -122,9 +117,11 @@ HTML_HEAD = """
|
|||
<meta charset="utf-8">
|
||||
<title>Cppcheck - HTML report - %s</title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<style>
|
||||
%s
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="page">
|
||||
<div id="header">
|
||||
<h1>Cppcheck report - %s: %s </h1>
|
||||
</div>
|
||||
|
@ -142,15 +139,13 @@ HTML_FOOTER = """
|
|||
</div>
|
||||
<div id="footer">
|
||||
<p>
|
||||
Cppcheck %s - a tool for static C/C++ code analysis
|
||||
</p>
|
||||
<ul>
|
||||
<li>Internet: <a href="http://cppcheck.sourceforge.net">http://cppcheck.sourceforge.net</a></li>
|
||||
<li>Forum: <a href="http://apps.sourceforge.net/phpbb/cppcheck/">http://apps.sourceforge.net/phpbb/cppcheck/</a></li>
|
||||
<li>IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></li>
|
||||
</ul>
|
||||
Cppcheck %s - a tool for static C/C++ code analysis</br>
|
||||
</br>
|
||||
Internet: <a href="http://cppcheck.sourceforge.net">http://cppcheck.sourceforge.net</a></br>
|
||||
Forum: <a href="http://apps.sourceforge.net/phpbb/cppcheck/">http://apps.sourceforge.net/phpbb/cppcheck/</a></br>
|
||||
IRC: <a href="irc://irc.freenode.net/cppcheck">irc://irc.freenode.net/cppcheck</a></br>
|
||||
<p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
@ -318,7 +313,7 @@ if __name__ == '__main__':
|
|||
'w') as output_file:
|
||||
output_file.write(HTML_HEAD %
|
||||
(options.title,
|
||||
#htmlFormatter.get_style_defs('.highlight'),
|
||||
htmlFormatter.get_style_defs('.highlight'),
|
||||
options.title,
|
||||
filename))
|
||||
|
||||
|
@ -343,7 +338,7 @@ if __name__ == '__main__':
|
|||
print('Creating index.html')
|
||||
with io.open(os.path.join(options.report_dir, 'index.html'),
|
||||
'w') as output_file:
|
||||
output_file.write(HTML_HEAD % (options.title, options.title, ''))
|
||||
output_file.write(HTML_HEAD % (options.title, '', options.title, ''))
|
||||
output_file.write(HTML_HEAD_END)
|
||||
output_file.write(' <table>\n')
|
||||
output_file.write(
|
||||
|
|
Loading…
Reference in New Issue