Fixing typos

Signed-off-by: Andreas Deininger <andreas@deininger.net>
This commit is contained in:
Andreas Deininger 2023-04-13 19:19:58 +02:00
parent 3c43db31d0
commit 6ae417cde9
No known key found for this signature in database
14 changed files with 19 additions and 19 deletions

View file

@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version-file: ./go.mod go-version-file: ./go.mod
cache: true cache: true

View file

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version-file: ./go.mod go-version-file: ./go.mod
cache: true cache: true

View file

@ -9,7 +9,7 @@ jobs:
d2-project: d2-project:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/add-to-project@v0.4.0 - uses: actions/add-to-project@v0.5.0
with: with:
project-url: https://github.com/orgs/terrastruct/projects/34 project-url: https://github.com/orgs/terrastruct/projects/34
github-token: ${{ secrets._GITHUB_TOKEN }} github-token: ${{ secrets._GITHUB_TOKEN }}

View file

@ -20,7 +20,7 @@ PRs when it's a visual change.
- Sequence diagrams are now supported, experimentally. See [docs](https://d2lang.com/tour/sequence-diagrams). [#99](https://github.com/terrastruct/d2/issues/99) - Sequence diagrams are now supported, experimentally. See [docs](https://d2lang.com/tour/sequence-diagrams). [#99](https://github.com/terrastruct/d2/issues/99)
- Formatting of d2 scripts is supported on the CLI with the `fmt` subcommand. See `man d2` or `d2 --help`. [#292](https://github.com/terrastruct/d2/pull/292) - Formatting of d2 scripts is supported on the CLI with the `fmt` subcommand. See `man d2` or `d2 --help`. [#292](https://github.com/terrastruct/d2/pull/292)
- Latex is now supported. See [docs](https://d2lang.com/tour/text) for how to use. [#229](https://github.com/terrastruct/d2/pull/229) - LaTeX is now supported. See [docs](https://d2lang.com/tour/text) for how to use. [#229](https://github.com/terrastruct/d2/pull/229)
- `direction` keyword is now supported to specify `up`, `down`, `right`, `left` layouts. See [docs](https://d2lang.com/tour/layouts) for more. - `direction` keyword is now supported to specify `up`, `down`, `right`, `left` layouts. See [docs](https://d2lang.com/tour/layouts) for more.
[#251](https://github.com/terrastruct/d2/pull/251) [#251](https://github.com/terrastruct/d2/pull/251)
- Self-referencing connections are now valid. E.g. `x -> x`. Render will vary based on layout engine. [#273](https://github.com/terrastruct/d2/pull/273) - Self-referencing connections are now valid. E.g. `x -> x`. Render will vary based on layout engine. [#273](https://github.com/terrastruct/d2/pull/273)

View file

@ -9,7 +9,7 @@
#### Bugfixes ⛑️ #### Bugfixes ⛑️
- Appendix seperator line no longer added to PNG export when appendix doesn't exist. [#582](https://github.com/terrastruct/d2/pull/582) - Appendix separator line no longer added to PNG export when appendix doesn't exist. [#582](https://github.com/terrastruct/d2/pull/582)
- Watch mode only fits to screen on initial load. [#601](https://github.com/terrastruct/d2/pull/601) - Watch mode only fits to screen on initial load. [#601](https://github.com/terrastruct/d2/pull/601)
- Dimensions (`width`/`height`) were incorrectly giving compiler errors when applied on a shape with style. [#614](https://github.com/terrastruct/d2/pull/614) - Dimensions (`width`/`height`) were incorrectly giving compiler errors when applied on a shape with style. [#614](https://github.com/terrastruct/d2/pull/614)
- `near` would collide with labels if they were on the diagram boundaries in the same position. [#617](https://github.com/terrastruct/d2/pull/617) - `near` would collide with labels if they were on the diagram boundaries in the same position. [#617](https://github.com/terrastruct/d2/pull/617)

View file

@ -31,4 +31,4 @@ D2 0.3 is here!
- Prevents an object's `near` from targeting another object with `near` set to a constant [#1100](https://github.com/terrastruct/d2/pull/1100) - Prevents an object's `near` from targeting another object with `near` set to a constant [#1100](https://github.com/terrastruct/d2/pull/1100)
- Fixes inaccurate bold edge label padding [#1108](https://github.com/terrastruct/d2/pull/1108) - Fixes inaccurate bold edge label padding [#1108](https://github.com/terrastruct/d2/pull/1108)
- Prevents Latex blocks from being uppercased in special themes [#1111](https://github.com/terrastruct/d2/pull/1111) - Prevents LaTeX blocks from being uppercased in special themes [#1111](https://github.com/terrastruct/d2/pull/1111)

View file

@ -250,7 +250,7 @@ func (c *compiler) compileLabel(attrs *d2graph.Attributes, f d2ir.Node) {
scalar := f.Primary().Value scalar := f.Primary().Value
switch scalar := scalar.(type) { switch scalar := scalar.(type) {
case *d2ast.Null: case *d2ast.Null:
// TODO: Delete instaed. // TODO: Delete instead.
attrs.Label.Value = scalar.ScalarString() attrs.Label.Value = scalar.ScalarString()
case *d2ast.BlockString: case *d2ast.BlockString:
attrs.Language = scalar.Tag attrs.Language = scalar.Tag
@ -669,7 +669,7 @@ var FullToShortLanguageAliases map[string]string
func (c *compiler) compileClass(obj *d2graph.Object) { func (c *compiler) compileClass(obj *d2graph.Object) {
obj.Class = &d2target.Class{} obj.Class = &d2target.Class{}
for _, f := range obj.ChildrenArray { for _, f := range obj.ChildrenArray {
visiblity := "public" visibility := "public"
name := f.IDVal name := f.IDVal
// See https://www.uml-diagrams.org/visibility.html // See https://www.uml-diagrams.org/visibility.html
if name != "" { if name != "" {
@ -677,10 +677,10 @@ func (c *compiler) compileClass(obj *d2graph.Object) {
case '+': case '+':
name = name[1:] name = name[1:]
case '-': case '-':
visiblity = "private" visibility = "private"
name = name[1:] name = name[1:]
case '#': case '#':
visiblity = "protected" visibility = "protected"
name = name[1:] name = name[1:]
} }
} }
@ -693,7 +693,7 @@ func (c *compiler) compileClass(obj *d2graph.Object) {
obj.Class.Fields = append(obj.Class.Fields, d2target.ClassField{ obj.Class.Fields = append(obj.Class.Fields, d2target.ClassField{
Name: name, Name: name,
Type: typ, Type: typ,
Visibility: visiblity, Visibility: visibility,
}) })
} else { } else {
// TODO: Not great, AST should easily allow specifying alternate primary field // TODO: Not great, AST should easily allow specifying alternate primary field
@ -705,7 +705,7 @@ func (c *compiler) compileClass(obj *d2graph.Object) {
obj.Class.Methods = append(obj.Class.Methods, d2target.ClassMethod{ obj.Class.Methods = append(obj.Class.Methods, d2target.ClassMethod{
Name: name, Name: name,
Return: returnType, Return: returnType,
Visibility: visiblity, Visibility: visibility,
}) })
} }
} }

View file

@ -428,7 +428,7 @@ func CompareSerializedEdge(edge, other *Edge) error {
if edge.LabelDimensions.Height != other.LabelDimensions.Height { if edge.LabelDimensions.Height != other.LabelDimensions.Height {
return fmt.Errorf( return fmt.Errorf(
"label hieght differs: edge=%d, other=%d", "label height differs: edge=%d, other=%d",
edge.LabelDimensions.Height, edge.LabelDimensions.Height,
other.LabelDimensions.Height, other.LabelDimensions.Height,
) )

View file

@ -1,6 +1,6 @@
package d2layoutfeatures package d2layoutfeatures
// When this is true, objects can set ther `near` key to another object // When this is true, objects can set their `near` key to another object
// When this is false, objects can only set `near` to constants // When this is false, objects can only set `near` to constants
const NEAR_OBJECT = "near_object" const NEAR_OBJECT = "near_object"

View file

@ -8,7 +8,7 @@ import (
type PluginFeature string type PluginFeature string
// When this is true, objects can set ther `near` key to another object // When this is true, objects can set their `near` key to another object
// When this is false, objects can only set `near` to constants // When this is false, objects can only set `near` to constants
const NEAR_OBJECT PluginFeature = "near_object" const NEAR_OBJECT PluginFeature = "near_object"

View file

@ -1,7 +1,7 @@
# d2fonts # d2fonts
The SVG renderer embeds fonts directly into the SVG as base64 data. This is to give The SVG renderer embeds fonts directly into the SVG as base64 data. This is to give
determinstic outputs and load without a network call. deterministic outputs and load without a network call.
To include your own font, e.g. `Helvetica`, you must include the Truetype glyphs: To include your own font, e.g. `Helvetica`, you must include the Truetype glyphs:
- `./ttf/Helvetica-Bold.ttf` - `./ttf/Helvetica-Bold.ttf`

View file

@ -19,7 +19,7 @@ func NewThemableSketchOverlay(el *ThemableElement, fill string) *ThemableSketchO
} }
// TODO we can just call el.Copy() to prevent that // TODO we can just call el.Copy() to prevent that
// WARNING: Do not reuse the element afterwards as this function changes the Class propery // WARNING: Do not reuse the element afterwards as this function changes the Class property
func (o *ThemableSketchOverlay) Render() (string, error) { func (o *ThemableSketchOverlay) Render() (string, error) {
if color.IsThemeColor(o.fill) { if color.IsThemeColor(o.fill) {
o.el.ClassName += fmt.Sprintf(" sketch-overlay-%s", o.fill) // e.g. sketch-overlay-B3 o.el.ClassName += fmt.Sprintf(" sketch-overlay-%s", o.fill) // e.g. sketch-overlay-B3

View file

@ -20,7 +20,7 @@ func TestSegmentIntersections(t *testing.T) {
assert.Equal(t, len(intersections), 1) assert.Equal(t, len(intersections), 1)
assert.True(t, intersections[0].Equals(NewPoint(10, 10))) assert.True(t, intersections[0].Equals(NewPoint(10, 10)))
// intersection at the beginnig // intersection at the beginning
s4 := NewSegment(NewPoint(0, 0), NewPoint(0, 10)) s4 := NewSegment(NewPoint(0, 0), NewPoint(0, 10))
intersections = s1.Intersections(*s4) intersections = s1.Intersections(*s4)
assert.Equal(t, len(intersections), 1) assert.Equal(t, len(intersections), 1)

View file

@ -148,7 +148,7 @@ func (g *GoFPDF) AddPDFPage(png []byte, boardPath []string, themeID int64, fill
} }
} }
// Draw header/img seperator // Draw header/img separator
g.pdf.SetXY(headerMargin, headerHeight) g.pdf.SetXY(headerMargin, headerHeight)
g.pdf.SetLineWidth(1) g.pdf.SetLineWidth(1)
if fillRGB.IsLight() { if fillRGB.IsLight() {