Page warnings log their line only, never words or source (M-11)
A document can forge both a console message and its source (KaTeX's \errmessage, data: scripts, sourceURL, encoded paths), so the display handler logs a line number and nothing the page wrote. The page's own diagnostics reach the app over elyQuery: a missed reveal sends its line; the visual failure and diagram lines already did. A test calls the real handler and checks the captured log. Round 5 found only the missing test; it is added and mutation-checked, with no sixth review under the five-round cap. M-15 is new: the print page runs a document's scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4a2dcbb222
commit
c5cb153f72
13 files changed
+101
-30
No files matched your search
@@ -89,7 +89,6 @@ async function build(text, mode) {
|
||||
made = await visual(place, body, mode === 'visual', texts, edited, edge, linked)
|
||||
} catch (error) {
|
||||
// A broken editor falls back to source and says so.
|
||||
console.error(`ely: the visual editor failed: ${error.name}`)
|
||||
entry.broke = error.name
|
||||
}
|
||||
if (made) {
|
||||
@@ -262,8 +261,8 @@ function reveal(place) {
|
||||
}
|
||||
const shown =
|
||||
'heading' in place ? current.heading(place.heading) : current.line(place.line, place.query)
|
||||
// Logs keep no search text; a line number at most.
|
||||
if (shown === false) console.warn('heading' in place ? 'ely: no such heading' : `ely: nothing at line ${place.line}`)
|
||||
// The app logs a line number, never the query.
|
||||
if (shown === false) tell({ kind: 'missed', generation, line: place.line ?? null })
|
||||
}
|
||||
|
||||
/** The app's find box hears where the search stands. */
|
||||
|
||||
@@ -27,9 +27,8 @@ async function draw(tree) {
|
||||
try {
|
||||
const svg = await paint(node.value, 'paper')
|
||||
Object.assign(node, { type: 'html', value: `<figure class="diagram">${svg}</figure>` })
|
||||
} catch (error) {
|
||||
} catch {
|
||||
// Lines only: Mermaid's message quotes the document.
|
||||
console.warn(`ely: a diagram did not draw: ${error.name}`)
|
||||
failed.push(node.position.start.line)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user