Use double quotes in HTML output to accommodate limited third-party tools · Issue #361 · nedbat/coveragepy (original) (raw)

Originally reported by Robin James Kerrison (Bitbucket: rjkerrison, GitHub: rjkerrison)


The coverage.py HTML output wraps the values of attributes in single quotes, thusly:

#!html
<head>
    <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
    <title>Coverage report</title>
    <link rel='stylesheet' href='style.css' type='text/css'>
    
    <script type='text/javascript' src='jquery.min.js'></script>
    <script type='text/javascript' src='jquery.tablesorter.min.js'></script>
    <script type='text/javascript' src='jquery.hotkeys.js'></script>
    <script type='text/javascript' src='coverage_html.js'></script>
    <script type='text/javascript' charset='utf-8'>
        jQuery(document).ready(coverage.index_ready);
    </script>
</head>

It should be wrapping in double quotes, or at least there should be an easy way to configure using double quotes.

Current behaviour is an issue when trying to use coverage.py alongside CCNet, since the former outputs single quotes and the latter only searches for double quotes when resolving sources and anchors using its RetrieveBuildFile handler.