Use txt instead of txt as it directly maps to plantuml-server URLs
This commit is contained in:
parent
7a4e8d7908
commit
6ae98ae7ef
|
@ -274,10 +274,10 @@
|
|||
|
||||
(defvar plantuml-output-type
|
||||
(if (not (display-images-p))
|
||||
"utxt"
|
||||
"txt"
|
||||
(cond ((image-type-available-p 'svg) "svg")
|
||||
((image-type-available-p 'png) "png")
|
||||
(t "utxt")))
|
||||
(t "txt")))
|
||||
"Specify the desired output type to use for generated diagrams.")
|
||||
|
||||
(defun plantuml-read-output-type ()
|
||||
|
@ -287,7 +287,7 @@
|
|||
(append
|
||||
(and (image-type-available-p 'svg) '("svg"))
|
||||
(and (image-type-available-p 'png) '("png"))
|
||||
'("utxt"))))
|
||||
'("txt"))))
|
||||
(completing-read (format "Output type [%s]: " plantuml-output-type)
|
||||
available-types
|
||||
nil
|
||||
|
@ -306,7 +306,7 @@ default output type for new buffers."
|
|||
|
||||
(defun plantuml-is-image-output-p ()
|
||||
"Return non-nil if the diagram output format is an image, false if it's text based."
|
||||
(not (equal "utxt" plantuml-output-type)))
|
||||
(not (equal "txt" plantuml-output-type)))
|
||||
|
||||
(defun plantuml-output-type-opt ()
|
||||
"Create the flag to pass to PlantUML to produce the selected output format."
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
|
||||
(defun assert-preview (puml output &optional format)
|
||||
(if format
|
||||
(setq plantuml-output-type format)
|
||||
(setq plantuml-output-type "utxt"))
|
||||
(setq plantuml-output-type format)
|
||||
(setq plantuml-output-type "txt"))
|
||||
(plantuml-preview-string 42 (read-test-file puml))
|
||||
(sleep-for 3)
|
||||
(should (equal (format-preview-output (replace-regexp-in-string " " "~" (read-test-file output)))
|
||||
(format-preview-output (replace-regexp-in-string " " "~" (read-preview-buffer))))))
|
||||
|
||||
(ert-deftest preview-utxt-test ()
|
||||
(ert-deftest preview-txt-test ()
|
||||
(setq-local plantuml-jar-path plantuml-test-jar-path)
|
||||
(assert-preview "a-b.puml" "a-b.txt"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue