Commit cc0127e4 authored by ioa's avatar ioa

fixed the bug in the hack.

parent b1143bcd
...@@ -75,10 +75,12 @@ will allow up to 100 large diagrams to be created in 'parallel'.") ...@@ -75,10 +75,12 @@ will allow up to 100 large diagrams to be created in 'parallel'.")
"This code is not a code, it's literal and too long." "This code is not a code, it's literal and too long."
(if (< (length input-names) 50) (if (< (length input-names) 50)
(format nil "~{~a~^-~}" input-names) (format nil "~{~a~^-~}" input-names)
(progn (if (>= *temp-hack* 100) (let ((temp-hack (write-to-string *temp-hack*)))
(setq *temp-hack* 0) (prog1 (concatenate 'string
(setq *temp-hack* (+ 1 *temp-hack*))) "large-diagram-" temp-hack)
(eval (format nil "large-diagram-~a" *temp-hack*))))) (if (>= *temp-hack* 100)
(setq *temp-hack* 0)
(setq *temp-hack* (+ 1 *temp-hack*)))))))
(defun encoded-string (key input-string label-style add-top-bottom) (defun encoded-string (key input-string label-style add-top-bottom)
;=> '(names-list filename uri rel-path) ;=> '(names-list filename uri rel-path)
...@@ -88,13 +90,14 @@ will allow up to 100 large diagrams to be created in 'parallel'.") ...@@ -88,13 +90,14 @@ will allow up to 100 large diagrams to be created in 'parallel'.")
(append '(0 1) (append '(0 1)
#1=(parse-input input-string)) #1=(parse-input input-string))
#1#))) #1#)))
(input-names (name-transformer key input-names%))) (input-names (name-transformer key input-names%))
(list input-names (filename (concatenate 'string
#2=(concatenate 'string label-style "-"
label-style "-" (encode-names input-names)))
(encode-names input-names)) (uri (concatenate 'string "/" filename ".png"))
#3=(concatenate 'string "/" #2# ".png") (rel-path (concatenate 'string "diagrams" uri)))
(concatenate 'string "diagrams" #3#)))) (list input-names filename uri rel-path)))
(defmacro make-diagram-page (input-names uri) (defmacro make-diagram-page (input-names uri)
`(with-output-to-string (stream) `(with-output-to-string (stream)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment