           (map vector
                (iterate inc start-i) ;; old line numbers
                (safe-subvec (:lines prev-state) start-i) ;; old lines
-               (safe-subvec (:postline-states prev-state) start-i))))
+               (safe-subvec (:postindent-states prev-state) start-i))))
 
 (defn initial-cached-state
   "build an initial state based on our starting line and previous cache."
-  [{:keys [lines postline-states] :as prev-state} overrides i]
+  [{:keys [lines postline-states postindent-states] :as prev-state} overrides i]
   (let [line-data {:lines (subvec lines 0 i)
+                   :postindent-states (subvec postindent-states 0 i)
                    :postline-states (subvec postline-states 0 i)
                    :line-no (dec i)}
         last-cache (get postline-states (dec i))]

        skip? (and check-indent? (closing-delim? ch))
        at-indent? (and check-indent? (not skip?))
        state (assoc state :process? (not skip?))]
    (cond-> state
      at-indent? (close-delims x-pos))))

(defn update-line
  "Update the state by adding processed character to the line."

         line-no (+ (:line-no state) line-dy)
         state (-> state
                    (update-in [:lines line-no] insert-string x-pos delims)
                    (assoc :stack stack))]
     state)))

(defn update-delim-trail
