mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
jupyter-insert: Only fontify the docstring region for Python inspect requests
* jupyter-python.el (jupyter-insert): Do it.
This commit is contained in:
parent
45a62b6b81
commit
0052d9b30f
1 changed files with 8 additions and 3 deletions
|
@ -63,9 +63,14 @@ buffer."
|
|||
(cond
|
||||
((and (eq mime :text/plain)
|
||||
(eq (jupyter-message-type msg) :inspect-reply))
|
||||
(when (search-forward "Docstring:" nil t)
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward "^Docstring:" nil t)
|
||||
(jupyter-fontify-region-according-to-mode
|
||||
#'rst-mode (1+ (point)) (point-max))))
|
||||
#'rst-mode (1+ (point))
|
||||
(or (and (re-search-forward "^File:" nil t)
|
||||
(line-beginning-position))
|
||||
(point-max))))))
|
||||
(t nil)))))
|
||||
|
||||
(cl-defmethod jupyter-load-file-code (file &context (jupyter-lang python))
|
||||
|
|
Loading…
Add table
Reference in a new issue