Function: markdown-ts-insert-structure

markdown-ts-insert-structure is an interactive and byte-compiled function defined in markdown-ts-mode.el.gz.

Signature

(markdown-ts-insert-structure &optional CHAR)

Documentation

Insert a block structure.

If there is an active region, wrap it. Otherwise, insert an empty block and place point inside. CHAR selects the structure type:

  ` fenced code block (```)
  ~ tilde fenced code block (~~~)
  q block quote (> )
  d horizontal divider/rule (---)
  t table

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/markdown-ts-mode.el.gz
;;; Block structure:

(defun markdown-ts-insert-structure (&optional char)
  "Insert a block structure.
If there is an active region, wrap it.  Otherwise, insert an empty
block and place point inside.  CHAR selects the structure type:

  `  fenced code block (```)
  ~  tilde fenced code block (~~~)
  q  block quote (> )
  d  horizontal divider/rule (---)
  t  table"
  (interactive
   "cStructure [`]back-tick code block [~]tilde code block [q]uote [d]ivider [t]able:")
  (pcase char
    (?` (markdown-ts--insert-code-block ?`))
    (?~ (markdown-ts--insert-code-block ?~))
    (?q (markdown-ts--insert-block-quote))
    (?d (markdown-ts--insert-divider))
    (?t (markdown-ts-table-insert-table))
    (_ (user-error "No such structure: %c" char))))