mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-05 17:11:41 -05:00
Fixing :prompt_number property on saving.
More conditional code for saving notebooks in nbformat v4.0. `prompt_number` is no longer a valid property so it has to be corrected to be `execution_count` instead.
This commit is contained in:
parent
5cdb7ca907
commit
b83621299e
1 changed files with 7 additions and 1 deletions
|
@ -989,7 +989,7 @@ prettified text thus be used instead of HTML type."
|
|||
(loop while ocopy
|
||||
do (let ((prop (pop ocopy))
|
||||
(value (pop ocopy)))
|
||||
(ein:log 'info "Checking property %s for output type %s"
|
||||
(ein:log 'info "Checking property %s for output type '%s'"
|
||||
prop otype)
|
||||
(cond
|
||||
((equal prop :stream) (progn (push value new-output)
|
||||
|
@ -1012,6 +1012,12 @@ prettified text thus be used instead of HTML type."
|
|||
(push (list new-prop (list value)) new-output)
|
||||
(push :data new-output)))
|
||||
|
||||
((and (equal otype "execute_result")
|
||||
(equal prop :prompt_number))
|
||||
(ein:log 'info "SAVE-NOTEBOOK: Fixing prompt_number property.")
|
||||
(push value new-output)
|
||||
(push :execution_count new-output))
|
||||
|
||||
(t (progn (push value new-output) (push prop new-output)))))
|
||||
finally return new-output))
|
||||
renamed-outputs))))
|
||||
|
|
Loading…
Add table
Reference in a new issue