Function: projectile--toml-string-array

projectile--toml-string-array is a byte-compiled function defined in projectile.el.

Signature

(projectile--toml-string-array TEXT KEY)

Documentation

Return the strings of the TOML array assigned to KEY in TEXT, or nil.

Comments are stripped first, so the # Internal notes Cargo manifests carry inside their member list don't end up in the result.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--toml-string-array (text key)
  "Return the strings of the TOML array assigned to KEY in TEXT, or nil.
Comments are stripped first, so the `# Internal' notes Cargo manifests
carry inside their member list don't end up in the result."
  (when (string-match (concat "^[[:space:]]*" (regexp-quote key)
                              "[[:space:]]*=[[:space:]]*\\[\\(\\(?:.\\|\n\\)*?\\)\\]")
                      text)
    (let ((body (replace-regexp-in-string "#[^\n]*" "" (match-string 1 text)))
          (out nil)
          (start 0))
      (while (string-match "\"\\([^\"]*\\)\"" body start)
        (push (match-string 1 body) out)
        (setq start (match-end 0)))
      (nreverse out))))