parent
de5d9b3dd7
commit
366ecb605a
|
@ -342,7 +342,7 @@ Uses prefix (as PREFIX) to choose where to display it:
|
|||
(defvar plantuml-keywords-regexp (concat "^\\s *" (regexp-opt plantuml-keywords 'words) "\\|\\(<\\|<|\\|\\*\\|o\\)\\(\\.+\\|-+\\)\\|\\(\\.+\\|-+\\)\\(>\\||>\\|\\*\\|o\\)\\|\\.\\{2,\\}\\|-\\{2,\\}"))
|
||||
(defvar plantuml-builtins-regexp (regexp-opt plantuml-builtins 'words))
|
||||
(defvar plantuml-preprocessors-regexp (concat "^\\s *" (regexp-opt plantuml-preprocessors 'words)))
|
||||
(defvar plantuml-indent-regexp-start "^[ \t]*\\(\\(?:.*\\)?\s*\\(?:[<>.*a-z-|]+\\)?\s*\\(?:\\[[a-zA-Z]+\\]\\)?\s+if\s+.*\\|loop\s+.*\\|group\s+.*\\|par\s*$\\|opt\s+.*\\|alt\s+.*\\|else\\|note\s+over\\|note\sas\s.*\\|note\s+\\(\\(?:\\(?:button\\|left\\|right\\|top\\)\\)\\)\\(?:\s+of\\)?\\|\\(?:class\\|enum\\|package\\|database\\|frame\\|cloud\\|folder\\)\s+.*{\\|activate\s+.+\\)")
|
||||
(defvar plantuml-indent-regexp-start "^[ \t]*\\(\\(?:.*\\)?\s*\\(?:[<>.*a-z-|]+\\)?\s*\\(?:\\[[a-zA-Z]+\\]\\)?\s+if\s+.*\\|loop\s+.*\\|group\s+.*\\|par\s*$\\|opt\s+.*\\|alt\s+.*\\|else\\|note\s+over\\|note\sas\s.*\\|note\s+\\(\\(?:\\(?:button\\|left\\|right\\|top\\)\\)\\)\\(?:\s+of\\)?\\|\\(?:\\(abstract \\)?class\\|enum\\|package\\|database\\|frame\\|cloud\\|folder\\)\s+.*{\\|activate\s+.+\\)")
|
||||
(defvar plantuml-indent-regexp-end "^[ \t]*\\(endif\\|else\\|end\\|end\s+note\\|.*}\\|deactivate\s+.+\\)")
|
||||
|
||||
(setq plantuml-font-lock-keywords
|
||||
|
|
|
@ -306,8 +306,33 @@ package APackage {
|
|||
}
|
||||
"))
|
||||
|
||||
(ert-deftest platuml-test-block-indentation/class ()
|
||||
"Test correct indentation of a class block"
|
||||
(plantuml-test-indent-block
|
||||
"
|
||||
class Foo {
|
||||
+bar()
|
||||
}
|
||||
"
|
||||
"
|
||||
class Foo {
|
||||
+bar()
|
||||
}
|
||||
")
|
||||
(plantuml-test-indent-block
|
||||
"
|
||||
abstract class Foo {
|
||||
+bar()
|
||||
}
|
||||
"
|
||||
"
|
||||
abstract class Foo {
|
||||
+bar()
|
||||
}
|
||||
"))
|
||||
|
||||
(ert-deftest plantuml-test-block-indentation/various-keywords ()
|
||||
"Test correct indentation of a package block."
|
||||
"Test correct indentation of block keywords."
|
||||
(plantuml-test-indent-block
|
||||
"
|
||||
cloud \"mycloud\" {
|
||||
|
|
Loading…
Reference in New Issue