This provides an option to override the functionality provided by the theme, or apply `text-transform` outside of the theme. The functionality of the `text-transform` is as below: - `text-transform: none` - will disable **any** transformation (like the uppercasing by `terminal` theme) - `text-transform: uppercase` (uppercase not upper as per your message) - will force all characters into uppercase. - `text-transform: lowercase` - will force all characters into lowercase. - `text-transform: capitalize` - will uppercase the first letter of every word In addition, this commit introduces: - helper methods on the `d2graph.Style` struct to determine the type of `text-transform` to be applied. - `ApplyTextTransform` method on the `d2graph.Attributes` which will transform the `Label.Value` to the correct text case. |
||
|---|---|---|
| .. | ||
| report | ||
| testdata | ||
| .gitignore | ||
| e2e_test.go | ||
| markdowntest.md | ||
| measured_test.go | ||
| NOTICE.txt | ||
| patterns_test.go | ||
| README.md | ||
| regression_test.go | ||
| root_test.go | ||
| stable_test.go | ||
| themes_test.go | ||
| todo_test.go | ||
| unicode_test.go | ||
e2etests
e2etests test the end-to-end flow of turning D2 scripts into a rendered diagram
Tests fall under 1 of 3 categories:
- Stable. Scripts which produce diagrams that never had issues this major release.
- Regressions. Scripts which used to have issues but no longer do. Each one should be linked to the PR which fixed it.
- Todos. Scripts which have an issue. If the issue prevents compile,
skip: truecan be set, otherwise the issue is visual. Each one should be linked to a Github Issue which describes it.
Upon a major release, Regressions are carried over to Stable.
If a change results in test diffs, you can run this script to generate a visual HTML report with the old vs new renders.
go run ./e2etests/report/main.go -delta
open ./e2etests/out/e2e_report.html