@@ -14,7 +14,7 @@ mustache.Template _template = mustache.Template(r'''
14
14
<html>
15
15
<head>
16
16
<title>Non-nullable fix instrumentation report</title>
17
- <!-- <script src="{{ highlightJsPath }}"></script>-- >
17
+ <script src="{{ highlightJsPath }}"></script>
18
18
<script>
19
19
function getHash(location) {
20
20
var index = location.lastIndexOf("#");
@@ -49,18 +49,22 @@ mustache.Template _template = mustache.Template(r'''
49
49
document.addEventListener("DOMContentLoaded", highlightTarget);
50
50
window.addEventListener("hashchange", highlightTarget);
51
51
</script>
52
- <!-- < link rel="stylesheet" href="{{ highlightStylePath }}"> -- >
52
+ <link rel="stylesheet" href="{{ highlightStylePath }}">
53
53
<style>
54
54
a:link {
55
- color: #000000 ;
55
+ color: inherit ;
56
56
text-decoration-line: none;
57
57
}
58
58
59
59
a:visited {
60
- color: #000000 ;
60
+ color: inherit ;
61
61
text-decoration-line: none;
62
62
}
63
63
64
+ a:hover {
65
+ text-decoration-line: underline;
66
+ }
67
+
64
68
body {
65
69
font-family: sans-serif;
66
70
padding: 1em;
84
88
}
85
89
86
90
.regions {
91
+ padding: 0.5em;
87
92
position: absolute;
88
93
left: 0.5em;
89
94
top: 0.5em;
@@ -148,14 +153,7 @@ h2 {
148
153
{{# units }}'''
149
154
'<h2>{{{ path }}}</h2>'
150
155
'<div class="content">'
151
- // '<div class="highlighting">'
152
- // '{{! These regions are written out, unmodified, as they need to be found }}'
153
- // '{{! in one simple text string for highlight.js to hightlight them. }}'
154
- // '{{# regions }}'
155
- // '{{ content }}'
156
- // '{{/ regions }}'
157
- // '</div>'
158
- '<div class ="code">'
156
+ '<div class="code">'
159
157
'{{! Write the file content, modified to include navigation information, }}'
160
158
'{{! both anchors and links. }}'
161
159
'{{{ navContent }}}'
185
183
{{/ units }}
186
184
<script lang="javascript">
187
185
document.addEventListener("DOMContentLoaded", (event) => {
188
- document.querySelectorAll(".highlighting ").forEach((block) => {
186
+ document.querySelectorAll(".code ").forEach((block) => {
189
187
hljs.highlightBlock(block);
190
188
});
191
189
});
@@ -369,14 +367,14 @@ class MigrationInfo {
369
367
MigrationInfo (this .units, this .pathContext, this .includedRoot);
370
368
371
369
/// The path to the highlight.js script, relative to [unitInfo] .
372
- String highlightJsPath (UnitInfo unitInfo) =>
373
- pathContext.relative (pathContext. join (includedRoot, 'highlight.pack.js' ),
374
- from: pathContext.dirname (unitInfo.path));
370
+ String highlightJsPath (UnitInfo unitInfo) => pathContext. relative (
371
+ pathContext.join (includedRoot, '..' , 'highlight.pack.js' ),
372
+ from: pathContext.dirname (unitInfo.path));
375
373
376
374
/// The path to the highlight.js stylesheet, relative to [unitInfo] .
377
- String highlightStylePath (UnitInfo unitInfo) =>
378
- pathContext.relative (pathContext. join (includedRoot, 'androidstudio.css' ),
379
- from: pathContext.dirname (unitInfo.path));
375
+ String highlightStylePath (UnitInfo unitInfo) => pathContext. relative (
376
+ pathContext.join (includedRoot, '..' , 'androidstudio.css' ),
377
+ from: pathContext.dirname (unitInfo.path));
380
378
381
379
/// Generate mustache context for unit links, for navigation in the
382
380
/// instrumentation document for [thisUnit] .
0 commit comments