소스 검색

[banks] splitting fix

Innocenty Enikeew 8 년 전
부모
커밋
94216ba916
2개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 3
      plugins/raiffeisen.lisp
  2. 4 3
      plugins/tinkoff.lisp

+ 4 - 3
plugins/raiffeisen.lisp

@@ -226,9 +226,10 @@
      for text = (pta-ledger:render entry)
      for text = (pta-ledger:render entry)
      with page
      with page
      when (> (+ (length page) (length text) 2)
      when (> (+ (length page) (length text) 2)
-             2048)
-     collect (format nil "```~%~A```" page) and do (setf page nil)
-     do (setf page (format nil "~@[~A~%~%~]~A" page text))))
+             4096)
+     collect (format nil "```~%~A```" page) into pages and do (setf page nil)
+     do (setf page (format nil "~@[~A~%~%~]~A" page text))
+     finally (return (append pages (when page (list (format nil "```~%~A```" page)))))))
 
 
 (defun format-balance (accounts)
 (defun format-balance (accounts)
   (format nil "```~%~{~A~^~%~}```" (mapcar #'account->balance accounts)))
   (format nil "```~%~{~A~^~%~}```" (mapcar #'account->balance accounts)))

+ 4 - 3
plugins/tinkoff.lisp

@@ -196,9 +196,10 @@
      for text = (pta-ledger:render entry)
      for text = (pta-ledger:render entry)
      with page
      with page
      when (> (+ (length page) (length text) 2)
      when (> (+ (length page) (length text) 2)
-             2048)
-     collect (format nil "```~%~A```" page) and do (setf page nil)
-     do (setf page (format nil "~@[~A~%~%~]~A" page text))))
+             4096)
+     collect (format nil "```~%~A```" page) into pages and do (setf page nil)
+     do (setf page (format nil "~@[~A~%~%~]~A" page text))
+     finally (return (append pages (when page (list (format nil "```~%~A```" page)))))))
 
 
 (defun format-accounts (accounts)
 (defun format-accounts (accounts)
   (with-output-to-string (s)
   (with-output-to-string (s)