Skip to content

Commit

Permalink
tweak error display css
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Aug 10, 2024
1 parent 3c55edf commit ecdb1ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/components/ErrorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const ErrorMessage = ({ msg, stacktrace, cell_id }) => {
let pluto_actions = useContext(PlutoActionsContext)
const default_rewriter = {
pattern: /.?/,
display: (/** @type{string} */ x) => x.split("\n").map((line) => html`<p>${line}</p>`),
display: (/** @type{string} */ x) => _.dropRightWhile(x.split("\n"), (s) => s === "").map((line) => html`<p>${line === "" ? html`<br />` : line}</p>`),

Check failure on line 164 in frontend/components/ErrorMessage.js

View workflow job for this annotation

GitHub Actions / test

'_' refers to a UMD global, but the current file is a module. Consider adding an import instead.
}
const rewriters = [
{
Expand Down
5 changes: 4 additions & 1 deletion frontend/treeview.css
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ pluto-tree p-r pre {

jlerror {
font-size: 0.75rem;
font-family: "Roboto Mono", monospace;
font-family: var(--julia-mono-font-stack);
}
jlerror {
display: block;
Expand All @@ -257,9 +257,12 @@ jlerror > header {
color: var(--jlerror-header-color);
border-left: 3px solid var(--jlerror-header-color);
padding: 0.7rem;
background: var(--white);
border-radius: 3px;
}
jlerror > header > p {
margin-block-end: 0.2em;
white-space: pre-wrap;
}
jlerror > header > p:first-child {
font-weight: bold;
Expand Down
2 changes: 1 addition & 1 deletion src/packages/PkgCompat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ is_stdlib(package_name::AbstractString) = package_name ∈ _stdlibs()


# Initial fill of registry cache
function __init__()
function __init__()
refresh_registry_cache()
global global_ctx=PkgContext()
end
Expand Down

0 comments on commit ecdb1ae

Please sign in to comment.