Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Fixes #83
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Brown committed Nov 20, 2023
1 parent a6b55e6 commit 878cfe9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Changelog

## (unreleased)

- C4PlantUMLExporter: Fixes #83 (C4Plantuml export renders url property in wrong format).

## 1.17.0 (27th October 2023)

- C4PlantUMLExporter: Adds support for border style and stroke width (#73).
- C4PlantUMLExporter: Adds support for sequence diagrams (#66).
- C4PlantUMLExporter: Relationships are now rendered as `Rel` rather than `Rel_D`.
- MermaidDiagramExporter: Fixes #80 (Mermaid render error when description contains `(` character).
- Updated dependencies and minimum Java version (17).

## 1.16.1 (11th August 2023)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,7 @@ protected void writeElement(ModelView view, Element element, IndentingWriter wri

if (StringUtils.isNullOrEmpty(url)) {
url = element.getUrl();
if (!StringUtils.isNullOrEmpty(url)) {
url = "[[" + url + "]]";
} else {
if (StringUtils.isNullOrEmpty(url)) {
url = "";
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,4 +726,30 @@ public void borderStyling() {
"@enduml", diagram.getDefinition());
}

}
@Test
public void elementWithUrl() {
Workspace workspace = new Workspace("Name", "Description");
workspace.getModel().addSoftwareSystem("Name").setUrl("https://example.com");

SystemLandscapeView view = workspace.getViews().createSystemLandscapeView("key", "Description");
view.addAllElements();

Diagram diagram = new C4PlantUMLExporter().export(view);
assertEquals("""
@startuml
set separator none
title System Landscape
top to bottom direction
!include <C4/C4>
!include <C4/C4_Context>
System(Name, "Name", $descr="", $tags="", $link="https://example.com")
SHOW_LEGEND(true)
@enduml""", diagram.getDefinition());
}

}

0 comments on commit 878cfe9

Please sign in to comment.