Skip to content

Commit f1b0456

Browse files
authored
Merge pull request #130 from jongalloway/copilot/sub-pr-129
Fix stroke-linecap emission, complete PackageReadme DSL list, align target test ring order with docs
2 parents 5454924 + d9cc299 commit f1b0456

65 files changed

Lines changed: 242 additions & 245 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

doc/PackageReadme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dnx DiagramForge.Tool diagram.mmd --theme dracula --transparent -o overlay.svg
5959
## Supported today
6060

6161
- Mermaid subset: flowchart, block, sequence, state, mindmap, timeline, venn, architecture, and xychart
62-
- Conceptual DSL: matrix, pyramid, cycle, pillars, funnel, radial, and target
62+
- Conceptual DSL: matrix, pyramid, cycle, pillars, funnel, radial, target, chevrons, snake, tablist, tree, and more
6363
- Theme presets, theme JSON files, palette overrides, and frontmatter styling
6464

6565
DiagramForge intentionally implements a focused Mermaid subset rather than full Mermaid.js parity.

src/DiagramForge/Rendering/SvgStructureWriter.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ private static void AppendConnectorPath(
316316
string extraAttributes = "")
317317
{
318318
double strokeWidth = baseStrokeWidth ?? theme.StrokeWidth;
319+
string escapedLineCap = SvgRenderSupport.Escape(lineCap);
319320

320321
if (outlinedTargetConnector)
321322
{
@@ -325,18 +326,14 @@ private static void AppendConnectorPath(
325326
double outlineWidth = connectorStrokeWidth + (haloPerSide * 2);
326327
string appliedMarkerStart = includeMarkers ? markerStart : " ";
327328
string appliedMarkerEnd = includeMarkers ? markerEnd : " ";
328-
string escapedLineCap = SvgRenderSupport.Escape(lineCap);
329329
sb.AppendLine($""" <path d="{pathData}" fill="none" stroke="{outlineColor}" stroke-width="{SvgRenderSupport.F(outlineWidth)}" stroke-linecap="{escapedLineCap}" stroke-linejoin="round"{extraAttributes}{strokeDash}/>""");
330330
sb.AppendLine($""" <path d="{pathData}" fill="none" stroke="{strokeColor}" stroke-width="{SvgRenderSupport.F(connectorStrokeWidth)}" stroke-linecap="{escapedLineCap}" stroke-linejoin="round"{extraAttributes}{strokeDash}{appliedMarkerStart}{appliedMarkerEnd}/>""");
331331
return;
332332
}
333333

334334
string startMarker = includeMarkers ? markerStart : " ";
335335
string endMarker = includeMarkers ? markerEnd : " ";
336-
string lineCapAttribute = string.Equals(lineCap, "round", StringComparison.Ordinal)
337-
? string.Empty
338-
: $" stroke-linecap=\"{SvgRenderSupport.Escape(lineCap)}\"";
339-
sb.AppendLine($""" <path d="{pathData}" fill="none" stroke="{strokeColor}" stroke-width="{SvgRenderSupport.F(strokeWidth)}"{lineCapAttribute}{extraAttributes}{strokeDash}{startMarker}{endMarker}/>""");
336+
sb.AppendLine($""" <path d="{pathData}" fill="none" stroke="{strokeColor}" stroke-width="{SvgRenderSupport.F(strokeWidth)}" stroke-linecap="{escapedLineCap}"{extraAttributes}{strokeDash}{startMarker}{endMarker}/>""");
340337
}
341338

342339
private static bool TryGetMetadataDouble(IReadOnlyDictionary<string, object> metadata, string key, out double value)

tests/DiagramForge.E2ETests/Fixtures/conceptual-cycle-icons.expected.svg

Lines changed: 3 additions & 3 deletions
Loading

tests/DiagramForge.E2ETests/Fixtures/conceptual-cycle.expected.svg

Lines changed: 4 additions & 4 deletions
Loading

tests/DiagramForge.E2ETests/Fixtures/conceptual-radial-icons.expected.svg

Lines changed: 4 additions & 4 deletions
Loading

tests/DiagramForge.E2ETests/Fixtures/conceptual-radial.expected.svg

Lines changed: 4 additions & 4 deletions
Loading

tests/DiagramForge.E2ETests/Fixtures/conceptual-target-dracula-shadow.expected.svg

Lines changed: 3 additions & 3 deletions
Loading

tests/DiagramForge.E2ETests/Fixtures/conceptual-target.expected.svg

Lines changed: 3 additions & 3 deletions
Loading

tests/DiagramForge.E2ETests/Fixtures/conceptual-tree-orgchart.expected.svg

Lines changed: 10 additions & 10 deletions
Loading

tests/DiagramForge.E2ETests/Fixtures/conceptual-tree.expected.svg

Lines changed: 10 additions & 10 deletions
Loading

0 commit comments

Comments
 (0)