Merge pull request #174 from terrastruct/alixander/readme-ex-mobile

readme: Example image update
This commit is contained in:
Alexander Wang 2022-11-23 10:52:19 -08:00 committed by GitHub
commit a02ec1d8ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,7 @@ defendants.chesscom -> hans: 72 page report of cheating
> There is syntax highlighting with the editor plugins linked below. > There is syntax highlighting with the editor plugins linked below.
<img src="./docs/assets/syntax.png" alt="D2 render example" height="600px" /> <img src="./docs/assets/syntax.png" alt="D2 render example" />
## Quickstart ## Quickstart
@ -151,7 +151,7 @@ graph, _ = d2oracle.Set(graph, "meow.style.fill", nil, &color)
graph, _, _ = d2oracle.Create(graph, "cat") graph, _, _ = d2oracle.Create(graph, "cat")
// Move the shape "meow" inside the container "cat" // Move the shape "meow" inside the container "cat"
graph, _ = d2oracle.Move(graph, "meow", "cat.meow") graph, _ = d2oracle.Move(graph, "meow", "cat.meow")
// Prints formatted D2 code // Prints formatted D2 script
println(d2format.Format(graph.AST)) println(d2format.Format(graph.AST))
``` ```