Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PlantUML support #1125

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,13 @@
"quotes": [["\\\"", "\\\""], ["'", "'"]],
"extensions": ["php"]
},
"PlantUml": {
"name": "PlantUML",
"line_comment": ["'"],
"multi_line_comments": [["/'", "'/"]],
"quotes": [["\\\"", "\\\""]],
"extensions": ["puml"]
},
"Po": {
"name": "PO File",
"line_comment": ["#"],
Expand Down
35 changes: 35 additions & 0 deletions tests/data/plantuml.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
' 35 lines 10 code 13 comments 12 blanks
' plantuml line comments must start at the beginning of a line.
' plantuml block comments must either start on a newline or start and end on the same line as they start.
' strings cannot span multiple lines.
' single quotes are a valid string wrapper '', but not when they are the first non-whitespace characters on a line

' comment at start uml
@startuml

!include <C4/C4_Container>

'' this is also a comment

rectangle "this is a string" as r
/' this
is a multi-line
comment '/

/' this is also a multi-line comment '/
Container(C, "This is some more text", "text")

node n /' this is a multi-line comment at the end of a line '/

/' this is /' a valid '/ block comment '/

component "'this is not a comment"

/' this is a multi-line comment at the start of a line '/ interface i

boundary "/' this is not a multi-line comment '/"

System(s, "this is /' not part of a comment", "'/ this is also not part of a comment", "/' '/ /' neither is this")

' comment after start uml
@enduml
Loading