This commit is contained in:
Greg Sexton 2015-04-26 14:57:27 +01:00
parent fb1db05c3e
commit 5398602a97

View File

@ -66,11 +66,11 @@ position in the CONTENT."
acc)))) acc))))
(reverse acc)))) (reverse acc))))
;;; TODO: support tabs
(defun origami-indent-parser (create) (defun origami-indent-parser (create)
(cl-labels ((lines (string) (origami-get-positions string ".*?\r?\n")) (cl-labels ((lines (string) (origami-get-positions string ".*?\r?\n"))
(annotate-levels (lines) (annotate-levels (lines)
(-map (lambda (line) (-map (lambda (line)
;; TODO: support tabs
(let ((indent (length (car (s-match "^ *" (car line))))) (let ((indent (length (car (s-match "^ *" (car line)))))
(beg (cdr line)) (beg (cdr line))
(end (+ (cdr line) (length (car line)) -1))) (end (+ (cdr line) (length (car line)) -1)))