improved indentation for ref-groups

This commit is contained in:
René Schmelzer 2019-03-12 22:14:15 +01:00
parent 6515b3de97
commit 153860bacb
2 changed files with 22 additions and 3 deletions

View File

@ -358,7 +358,7 @@ Two variants for groups: keyword is either followed by whitespace and some text
or it is followed by line end.") or it is followed by line end.")
(defvar plantuml-indent-regexp-activate-start "^\s*activate\s+.+$") (defvar plantuml-indent-regexp-activate-start "^\s*activate\s+.+$")
(defvar plantuml-indent-regexp-box-start "^\s*box\s+.+$") (defvar plantuml-indent-regexp-box-start "^\s*box\s+.+$")
(defvar plantuml-indent-regexp-ref-start "^\s*ref\s+over\s+\\w+\s*$") (defvar plantuml-indent-regexp-ref-start "^ref +over +[^:]+?$")
(defvar plantuml-indent-regexp-title-start "^\s*title$") (defvar plantuml-indent-regexp-title-start "^\s*title$")
(defvar plantuml-indent-regexp-header-start "^\s*\\(?:\\(?:center\\|left\\|right\\)\s+header\\|header\\)$") (defvar plantuml-indent-regexp-header-start "^\s*\\(?:\\(?:center\\|left\\|right\\)\s+header\\|header\\)$")
(defvar plantuml-indent-regexp-footer-start "^\s*\\(?:\\(?:center\\|left\\|right\\)\s+footer\\|footer\\)$") (defvar plantuml-indent-regexp-footer-start "^\s*\\(?:\\(?:center\\|left\\|right\\)\s+footer\\|footer\\)$")

View File

@ -33,28 +33,47 @@ end box
" "
participant Alice participant Alice
actor Bob actor Bob
participant \"Great Cesar\"
ref over Alice, Bob : init ref over Alice, Bob : init
Alice -> Bob : hello Alice -> Bob : hello
ref over Bob ref over Bob, \"Great Cesar\"
This can be on This can be on
several lines several lines
end ref end ref
ref over Bob
This is a ref over Bob
end ref
ref over \"Great Cesar\"
This is a ref over \"Great Cesar\"
end ref
" "
" "
participant Alice participant Alice
actor Bob actor Bob
participant \"Great Cesar\"
ref over Alice, Bob : init ref over Alice, Bob : init
Alice -> Bob : hello Alice -> Bob : hello
ref over Bob ref over Bob, \"Great Cesar\"
This can be on This can be on
several lines several lines
end ref end ref
ref over Bob
This is a ref over Bob
end ref
ref over \"Great Cesar\"
This is a ref over \"Great Cesar\"
end ref
" )) " ))