Function: markdown-ts--code-block-newline
markdown-ts--code-block-newline is an interactive and byte-compiled
function defined in markdown-ts-mode.el.gz.
Signature
(markdown-ts--code-block-newline &optional ARG INTERACTIVE)
Documentation
Insert a newline, and move to left margin of the new line.
With prefix argument ARG, insert that many newlines.
If electric-indent-mode(var)/electric-indent-mode(fun) is enabled, this indents the final new line
that it adds, and reindents the preceding line. To just insert
a newline, use M-x electric-indent-just-newline (electric-indent-just-newline).
If auto-fill-mode is enabled, this may cause automatic line
breaking of the preceding line. A non-nil ARG inhibits this.
If variable use-hard-newlines(var)/use-hard-newlines(fun) is enabled, the newline is marked with
the text-property hard.
A non-nil INTERACTIVE argument means to run the post-self-insert-hook.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
;; NOTE: Do not add this command to `markdown-ts-code-block-commands'.
(defun markdown-ts--code-block-newline (&optional arg interactive)
"Insert a newline, and move to left margin of the new line.
With prefix argument ARG, insert that many newlines.
If `electric-indent-mode' is enabled, this indents the final new line
that it adds, and reindents the preceding line. To just insert
a newline, use \\[electric-indent-just-newline].
If `auto-fill-mode' is enabled, this may cause automatic line
breaking of the preceding line. A non-nil ARG inhibits this.
If variable `use-hard-newlines' is enabled, the newline is marked with
the text-property `hard'.
A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
(interactive "*P\np")
(if-let* ((block-mode (markdown-ts-code-block-mode-at))
((fboundp block-mode)))
(markdown-ts--run-command-in-code-block block-mode
#'newline
arg
interactive)
(funcall-interactively #'newline arg interactive)))