Function: org-escape-code-in-string

org-escape-code-in-string is a byte-compiled function defined in org-src.el.gz.

Signature

(org-escape-code-in-string S)

Documentation

Escape lines in string S.

Escaping happens when a line starts with "*", "#+", ",*" or
",#+" by appending a comma to it.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-src.el.gz
(defun org-escape-code-in-string (s)
  "Escape lines in string S.
Escaping happens when a line starts with \"*\", \"#+\", \",*\" or
\",#+\" by appending a comma to it."
  (replace-regexp-in-string "^[ \t]*\\(,*\\(?:\\*\\|#\\+\\)\\)" ",\\1"
			    s nil nil 1))