Skip to content

Commit

Permalink
Fix doc regression
Browse files Browse the repository at this point in the history
Only apply logic to handle multiple expressions on a single line if
the node is an expression.
  • Loading branch information
facelessuser committed Dec 3, 2024
1 parent a830c4e commit deff898
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/src/py/notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ def execute(cmd, no_except=True, inline=False, init='', g=None):
command = ''
for i, line in enumerate(stmt, 0):
if i == 0:
stmt[i] = '>>> ' + line[col_start:col_end]
stmt[i] = '>>> ' + (line[col_start:col_end] if isinstance(node, ast.Expr) else line)
else:
stmt[i] = '... ' + line[col_start:col_end]
stmt[i] = '... ' + (line[col_start:col_end] if isinstance(node, ast.Expr) else line)
command += '\n'.join(stmt)
if isinstance(node, AST_BLOCKS):
command += '\n... '
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ extra_javascript:
- https://unpkg.com/mermaid@10.6.1/dist/mermaid.min.js
- playground-config-4f0f586c.js
- https://cdn.jsdelivr.net/pyodide/v0.26.2/full/pyodide.js
- assets/coloraide-extras/extra-notebook-C-gQPRdO.js
- assets/coloraide-extras/extra-notebook-BvWUnGuN.js

extra:
social:
Expand Down

0 comments on commit deff898

Please sign in to comment.