-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
text-transform
attribute to the style
block
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.
- Loading branch information
1 parent
a53eb48
commit be9ddb1
Showing
16 changed files
with
910 additions
and
760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package d2graph | ||
|
||
var textTransforms = []string{"none", "uppercase", "lowercase", "capitalize"} |
Oops, something went wrong.