Skip to content
This repository was archived by the owner on Mar 28, 2026. It is now read-only.

Commit ba57795

Browse files
Fixes #346.
1 parent ff37cc2 commit ba57795

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- structurizr-component: Adds `ImplementationWithSuffixSupportingTypesStrategy`.
88
- structurizr-dsl: Adds `supportingTypes implementation-prefix <prefix>`.
99
- structurizr-dsl: Adds `supportingTypes implementation-suffix <suffix>`.
10+
- structurizr-dsl: Fixes https://github.com/structurizr/java/issues/346 (`// comment \` joins lines).
1011

1112
## 3.0.0 (19th September 2024)
1213

structurizr-dsl/src/main/java/com/structurizr/dsl/StructurizrDslParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ private List<DslLine> preProcessLines(List<String> lines) {
10691069
boolean lineComplete = true;
10701070

10711071
for (String line : lines) {
1072-
if (line.endsWith(MULTI_LINE_SEPARATOR)) {
1072+
if (!COMMENT_PATTERN.matcher(line).matches() && line.endsWith(MULTI_LINE_SEPARATOR)) {
10731073
buf.append(line, 0, line.length()-1);
10741074
lineComplete = false;
10751075
} else {

structurizr-dsl/src/test/resources/dsl/test.dsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ workspace "Name" "Description" {
2727
!impliedRelationships "com.structurizr.model.CreateImpliedRelationshipsUnlessSameRelationshipExistsStrategy"
2828
!impliedRelationships true
2929

30+
// single line comment with long line split character \
3031
properties {
3132
"Name" "Value"
3233
}

0 commit comments

Comments
 (0)