Skip to content

Commit

Permalink
Fix editor highlighting, broken by 1bc9f28
Browse files Browse the repository at this point in the history
  • Loading branch information
georgestagg committed Jul 16, 2024
1 parent 3e6d089 commit abdc05e
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 47 deletions.
2 changes: 1 addition & 1 deletion _extensions/live/resources/live-runtime.css

Large diffs are not rendered by default.

50 changes: 25 additions & 25 deletions _extensions/live/resources/live-runtime.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions docs/other/slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ webr:
fig-height: 432
---

# Read Only

```{webr}
#| edit: false
mod <- lm(mpg ~ cyl, data = mtcars)
summary(mod)
```

---

```{webr}
#| runbutton: false
#| startover: false
Expand Down
61 changes: 40 additions & 21 deletions live-runtime/src/css/live-runtime.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
border-top-left-radius: 5px;
}

.exercise-loading-details + .exercise-loading-details::before {
.exercise-loading-details+.exercise-loading-details::before {
content: "/ ";
}

Expand Down Expand Up @@ -171,67 +171,86 @@
--exercise-editor-hl-wa: var(--quarto-hl-wa-color, #dcc6e0);
}

pre > code.sourceCode span.tok-keyword {
pre>code.sourceCode span.tok-keyword,
.exercise-editor-body>.cm-editor span.tok-keyword {
color: var(--exercise-editor-hl-kw);
}

pre > code.sourceCode span.tok-operator {
pre>code.sourceCode span.tok-operator,
.exercise-editor-body>.cm-editor span.tok-operator {
color: var(--exercise-editor-hl-op);
}

pre > code.sourceCode span.tok-definitionOperator {
pre>code.sourceCode span.tok-definitionOperator,
.exercise-editor-body>.cm-editor span.tok-definitionOperator {
color: var(--exercise-editor-hl-ot);
}

pre > code.sourceCode span.tok-compareOperator {
pre>code.sourceCode span.tok-compareOperator,
.exercise-editor-body>.cm-editor span.tok-compareOperator {
color: var(--exercise-editor-hl-ot);
}

pre > code.sourceCode span.tok-attributeName {
pre>code.sourceCode span.tok-attributeName,
.exercise-editor-body>.cm-editor span.tok-attributeName {
color: var(--exercise-editor-hl-at);
}

pre > code.sourceCode span.tok-controlKeyword {
pre>code.sourceCode span.tok-controlKeyword,
.exercise-editor-body>.cm-editor span.tok-controlKeyword {
color: var(--exercise-editor-hl-cf);
}

pre > code.sourceCode span.tok-comment {
pre>code.sourceCode span.tok-comment,
.exercise-editor-body>.cm-editor span.tok-comment {
color: var(--exercise-editor-hl-co);
}

pre > code.sourceCode span.tok-string {
pre>code.sourceCode span.tok-string,
.exercise-editor-body>.cm-editor span.tok-string {
color: var(--exercise-editor-hl-st);
}

pre > code.sourceCode span.tok-string2 {
pre>code.sourceCode span.tok-string2,
.exercise-editor-body>.cm-editor span.tok-string2 {
color: var(--exercise-editor-hl-ss);
}

pre > code.sourceCode span.tok-variableName {
pre>code.sourceCode span.tok-variableName,
.exercise-editor-body>.cm-editor span.tok-variableName {
color: var(--exercise-editor-hl-va);
}

pre > code.sourceCode span.tok-bool,
pre > code.sourceCode span.tok-literal,
pre > code.sourceCode span.tok-separator {
pre>code.sourceCode span.tok-bool,
pre>code.sourceCode span.tok-literal,
pre>code.sourceCode span.tok-separator,
.exercise-editor-body>.cm-editor span.tok-bool,
.exercise-editor-body>.cm-editor span.tok-literal,
.exercise-editor-body>.cm-editor span.tok-separator {
color: var(--exercise-editor-hl-cn);
}

pre > code.sourceCode span.tok-bool,
pre > code.sourceCode span.tok-literal {
pre>code.sourceCode span.tok-bool,
pre>code.sourceCode span.tok-literal,
.exercise-editor-body>.cm-editor span.tok-bool,
.exercise-editor-body>.cm-editor span.tok-literal {
color: var(--exercise-editor-hl-cn);
}

pre > code.sourceCode span.tok-number,
pre > code.sourceCode span.tok-integer {
pre>code.sourceCode span.tok-number,
pre>code.sourceCode span.tok-integer,
.exercise-editor-body>.cm-editor span.tok-number,
.exercise-editor-body>.cm-editor span.tok-integer {
color: var(--exercise-editor-hl-dv);
}

pre > code.sourceCode span.tok-function-variableName {
pre>code.sourceCode span.tok-function-variableName,
.exercise-editor-body>.cm-editor span.tok-function-variableName {
color: var(--exercise-editor-hl-fu);
}

pre > code.sourceCode span.tok-function-attributeName {
pre>code.sourceCode span.tok-function-attributeName,
.exercise-editor-body>.cm-editor span.tok-function-attributeName {
color: var(--exercise-editor-hl-at);
}

Expand Down Expand Up @@ -437,7 +456,7 @@ div.cell-output-pyodide th {
}

/* Hints and solutions */
.tab-pane>.exercise-tab-pane-header + div.webr-ojs-exercise {
.tab-pane>.exercise-tab-pane-header+div.webr-ojs-exercise {
margin-top: 1em;
}

Expand Down

0 comments on commit abdc05e

Please sign in to comment.