You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c7d9c0f
Browse filesBrowse the repository at this point in the historyBrowse files
explorer: fix gutter marker tooltip and add tests for the report javascript
The gutter marker tooltip in the code view showed raw markup because
tipHtml() output (escaped for a data-tip attribute) was assigned to
el.dataset.tip. Add tipInner() for that case.
Move the DOM-free javascript helpers into JS_LIB so they can be unit
tested with node's built-in test runner, and add a pytest wrapper that
runs the tests and syntax checks the generated report.js.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
const KW = new Set(('alignas alignof and asm auto break case catch class co_await co_return co_yield concept const consteval constexpr constinit const_cast continue ' +
1450
+
'decltype default delete do dynamic_cast else enum explicit export extern false final for friend goto if inline mutable namespace new noexcept not nullptr ' +
1451
+
'operator or override private protected public register reinterpret_cast requires return sizeof static static_assert static_cast struct switch template this ' +
1452
+
'thread_local throw true try typedef typeid typename union using virtual volatile while NULL').split(' '));
1453
+
const TY = new Set(('bool char char8_t char16_t char32_t double float int long short signed unsigned void wchar_t size_t ssize_t ptrdiff_t ' +
1454
+
'int8_t int16_t int32_t int64_t uint8_t uint16_t uint32_t uint64_t intptr_t uintptr_t std string vector map set list FILE').split(' '));
1455
+
const TOK = /(\/\/.*$)|(\/\*)|("(?:\\.|[^"\\])*"?)|('(?:\\.|[^'\\])*'?)|(\b\d[\w.']*|\.\d[\w']*)|([A-Za-z_]\w*)(\s*\()?|([^\w\s"'\/]+|\/|\s+)/y;
1456
+
1457
+
// returns true if the line ends inside a block comment
1458
+
function scanBlock(line, block) {
1459
+
let i = 0;
1460
+
const n = line.length;
1461
+
while (i < n) {
1462
+
if (block) {
1463
+
const e = line.indexOf('*/', i);
1464
+
if (e < 0) return true;
1465
+
block = false; i = e + 2;
1466
+
continue;
1467
+
}
1468
+
const c = line.charCodeAt(i);
1469
+
if (c === 47 /* / */) {
1470
+
const d = line.charCodeAt(i + 1);
1471
+
if (d === 47) return false;
1472
+
if (d === 42) { block = true; i += 2; continue; }
1473
+
} else if (c === 34 || c === 39) {
1474
+
i++;
1475
+
while (i < n && line.charCodeAt(i) !== c) i += line.charCodeAt(i) === 92 ? 2 : 1;
1476
+
}
1477
+
i++;
1478
+
}
1479
+
return block;
1480
+
}
1481
+
1482
+
function hl(line, st) {
1483
+
if (line.length > 3000) return esc(line);
1484
+
let out = '', pos = 0;
1485
+
if (st.block) {
1486
+
const e = line.indexOf('*/');
1487
+
if (e < 0) return `<span class="t-co">${esc(line)}</span>`;
1488
+
out += `<span class="t-co">${esc(line.slice(0, e + 2))}</span>`;
document.body.innerHTML = '<p style="padding:24px;font-family:sans-serif">Failed to load <code>data/results.js</code>. Keep the report files together in one folder.</p>';
const KW = new Set(('alignas alignof and asm auto break case catch class co_await co_return co_yield concept const consteval constexpr constinit const_cast continue ' +
2577
-
'decltype default delete do dynamic_cast else enum explicit export extern false final for friend goto if inline mutable namespace new noexcept not nullptr ' +
2578
-
'operator or override private protected public register reinterpret_cast requires return sizeof static static_assert static_cast struct switch template this ' +
2579
-
'thread_local throw true try typedef typeid typename union using virtual volatile while NULL').split(' '));
2580
-
const TY = new Set(('bool char char8_t char16_t char32_t double float int long short signed unsigned void wchar_t size_t ssize_t ptrdiff_t ' +
2581
-
'int8_t int16_t int32_t int64_t uint8_t uint16_t uint32_t uint64_t intptr_t uintptr_t std string vector map set list FILE').split(' '));
2582
-
const TOK = /(\/\/.*$)|(\/\*)|("(?:\\.|[^"\\])*"?)|('(?:\\.|[^'\\])*'?)|(\b\d[\w.']*|\.\d[\w']*)|([A-Za-z_]\w*)(\s*\()?|([^\w\s"'\/]+|\/|\s+)/y;
2583
-
2584
-
// returns true if the line ends inside a block comment
2585
-
function scanBlock(line, block) {
2586
-
let i = 0;
2587
-
const n = line.length;
2588
-
while (i < n) {
2589
-
if (block) {
2590
-
const e = line.indexOf('*/', i);
2591
-
if (e < 0) return true;
2592
-
block = false; i = e + 2;
2593
-
continue;
2594
-
}
2595
-
const c = line.charCodeAt(i);
2596
-
if (c === 47 /* / */) {
2597
-
const d = line.charCodeAt(i + 1);
2598
-
if (d === 47) return false;
2599
-
if (d === 42) { block = true; i += 2; continue; }
2600
-
} else if (c === 34 || c === 39) {
2601
-
i++;
2602
-
while (i < n && line.charCodeAt(i) !== c) i += line.charCodeAt(i) === 92 ? 2 : 1;
2603
-
}
2604
-
i++;
2605
-
}
2606
-
return block;
2607
-
}
2608
-
2609
-
function hl(line, st) {
2610
-
if (line.length > 3000) return esc(line);
2611
-
let out = '', pos = 0;
2612
-
if (st.block) {
2613
-
const e = line.indexOf('*/');
2614
-
if (e < 0) return `<span class="t-co">${esc(line)}</span>`;
2615
-
out += `<span class="t-co">${esc(line.slice(0, e + 2))}</span>`;
0 commit comments