Skip to content

Commit

Permalink
feat: added plantuml support
Browse files Browse the repository at this point in the history
  • Loading branch information
ptdewey committed Jul 23, 2024
1 parent 6392516 commit e6361d4
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
7 changes: 7 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,13 @@
"quotes": [["\\\"", "\\\""], ["'", "'"]],
"extensions": ["php"]
},
"PlantUml": {
"name": "PlantUML",
"line_comment": ["'"],
"multi_line_comments": [["/'", "'/"]],
"quotes": [["\\\"", "\\\""]],
"extensions": ["puml"]
},
"Poke": {
"multi_line_comments": [["/*", "*/"]],
"extensions": ["pk"]
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

0 comments on commit e6361d4

Please sign in to comment.