D2 is a modern diagram scripting language that turns text to diagrams.
226 matches across 6 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | lib/shape/shape_oval.go | 52 | // ┌──────────────────* ┬ |
| MEDIUM | lib/shape/shape_oval.go | 54 | // │ *┌───────────┤ │ ┬ |
| MEDIUM | lib/shape/shape_oval.go | 57 | // *──────┴───────────┼ ┴ ┴ |
| MEDIUM | lib/shape/shape_oval.go | 58 | // ├────────rx────────┤ |
| MEDIUM | lib/shape/shape.go | 197 | // . ┌────r─────────────────────────┐ |
| MEDIUM | lib/shape/shape.go | 208 | // . └──────xxxxxxxxxxxxxx──────────┘ |
| MEDIUM | lib/label/label.go | 562 | // ┌────────────────────┐ ┬ | ┌─┬─┐ |
| MEDIUM | lib/label/label.go | 563 | // │ │ │ | │ │ │ ┌───────────┬───────────┐ |
| MEDIUM | lib/label/label.go | 568 | // └────────────────────┘ │ ┴ ┬ | │ │ │ └───────────┴───────────┘ |
| MEDIUM | lib/label/label.go | 570 | // offset│ │label padding | ├──────────────────┤ |
| MEDIUM | lib/label/label.go | 572 | // ┌──────────────────────┐ │ ┬ ┴ | ├───────────┼───────────┤ |
| MEDIUM | lib/label/label.go | 574 | // ├─────edge─center──────┤ ┴ ┼stroke width | label padding |
| MEDIUM | lib/label/label.go | 576 | // └──────────────────────┘ ┴ | stroke width |
| MEDIUM | lib/pptx/pptx.go | 115 | // ┌──────────────────────────────────────────────────┐ ─┬─ |
| MEDIUM | lib/pptx/pptx.go | 117 | // ├──┬────────────────────────────────────────────┬──┤ │ ─┬─ |
| MEDIUM | lib/pptx/pptx.go | 127 | // └──┴────────────────────────────────────────────┴──┘ ─┴─ ─┴─ |
| MEDIUM | lib/pptx/pptx.go | 128 | // ├────────────────────SLIDE WIDTH───────────────────┤ |
| MEDIUM | lib/pptx/pptx.go | 129 | // ├─────────────────IMAGE WIDTH────────────────┤ |
| MEDIUM | d2layouts/d2layouts.go | 109 | // ┌grid(g.Root)───────────────────┐ ┌grid(g.Root)───────────────────┐ |
| MEDIUM | d2layouts/d2layouts.go | 110 | // │ ┌────┐ ┌curr───────────┐ │ │ ┌────┐ │ |
| MEDIUM | d2layouts/d2layouts.go | 113 | // │ │ ├──────┼C─┼──┼───►│ │ │ │ │ │ │ │ |
| MEDIUM | d2layouts/d2layouts.go | 115 | // │ └────┘ └───────────────┘ │ │ └────┘ │ |
| MEDIUM | d2layouts/d2layouts.go | 116 | // └───────────────────────────────┘ └───────────────────────────────┘ |
| MEDIUM | d2layouts/d2layouts.go | 177 | // ┌grid(g.Root)───────────────────┐ ┌grid(g.Root)───────────────────┐ |
| MEDIUM | d2layouts/d2layouts.go | 178 | // │ ┌────┐ ┌curr───────────┐ │ │ ┌────┐ ┌curr───────────┐ │ |
| MEDIUM | d2layouts/d2layouts.go | 181 | // │ │ ├──────┼C─┼──┼───►│ │ │ │ │ │ │ │ │ │ |
| MEDIUM | d2layouts/d2layouts.go | 183 | // │ └────┘ └───────────────┘ │ │ └────┘ └───────────────┘ │ |
| MEDIUM | d2layouts/d2layouts.go | 184 | // └───────────────────────────────┘ └───────────────────────────────┘ |
| MEDIUM | d2layouts/d2grid/layout.go | 326 | // . ┌A──────────────┐ ┌B──┐ ┌C─────────┐ ┌D────────┐ ┌E────────────────┐ |
| MEDIUM | d2layouts/d2grid/layout.go | 327 | // . └───────────────┘ │ │ │ │ │ │ │ │ |
| MEDIUM | d2layouts/d2grid/layout.go | 328 | // . │ │ └──────────┘ │ │ │ │ |
| MEDIUM | d2layouts/d2grid/layout.go | 329 | // . │ │ │ │ └─────────────────┘ |
| MEDIUM | d2layouts/d2grid/layout.go | 331 | // . └─────────┘ |
| MEDIUM | d2layouts/d2grid/layout.go | 333 | // . ┌A─────────────┐ ┌B──┐ ┌C─────────┐ ┌D────────┐ ┌E────────────────┐ |
| MEDIUM | d2layouts/d2grid/layout.go | 338 | // . └──────────────┘ └───┘ └──────────┘ └─────────┘ └─────────────────┘ |
| MEDIUM | d2layouts/d2grid/layout.go | 379 | // . ┌A─────────────┐ ┌B──┐ ┌C─────────┐ ┬ maxHeight(A,B,C) |
| MEDIUM | d2layouts/d2grid/layout.go | 383 | // . └──────────────┘ └───┘ └──────────┘ ┴ |
| MEDIUM | d2layouts/d2grid/layout.go | 384 | // . ┌D────────┬────┐ ┌E────────────────┐ ┬ maxHeight(D,E) |
| MEDIUM | d2layouts/d2grid/layout.go | 389 | // . └─────────┴────┘ └─────────────────┘ ┴ |
| MEDIUM | d2layouts/d2grid/layout.go | 427 | // . ┌A─────────────┐ ┌B──┐ ┌C─────────┐ ┬ maxHeight(A,B,C) |
| MEDIUM | d2layouts/d2grid/layout.go | 431 | // . └──────────────┘ └───┘ └──────────┘ ┴ |
| MEDIUM | d2layouts/d2grid/layout.go | 432 | // . ┌D────────┐ ┌E────────────────┐ ┬ maxHeight(D,E) |
| MEDIUM | d2layouts/d2grid/layout.go | 437 | // . └─────────┘ └─────────────────┘ ┴ |
| MEDIUM | d2layouts/d2grid/layout.go | 470 | // . ├maxWidth(A,B)─┤ ├maxW(C,D)─┤ ├maxWidth(E)──────┤ |
| MEDIUM | d2layouts/d2grid/layout.go | 471 | // . ┌A─────────────┐ ┌C─────────┐ ┌E────────────────┐ |
| MEDIUM | d2layouts/d2grid/layout.go | 473 | // . │ │ └──────────┘ │ │ |
| MEDIUM | d2layouts/d2grid/layout.go | 474 | // . └──────────────┘ ┌D─────────┐ ├ ─ ─ ─ ─ ─ ─ ─ ─ ┤ |
| MEDIUM | d2layouts/d2grid/layout.go | 475 | // . ┌B─────────────┐ │ │ │ │ |
| MEDIUM | d2layouts/d2grid/layout.go | 479 | // . └──────────────┘ └──────────┘ └─────────────────┘ |
| MEDIUM | d2layouts/d2grid/layout.go | 516 | // . ├maxWidth(A,B)─┤ ├maxW(C,D)─┤ ├maxWidth(E)──────┤ |
| MEDIUM | d2layouts/d2grid/layout.go | 517 | // . ┌A─────────────┐ ┌C─────────┐ ┌E────────────────┐ |
| MEDIUM | d2layouts/d2grid/layout.go | 518 | // . └──────────────┘ │ │ │ │ |
| MEDIUM | d2layouts/d2grid/layout.go | 519 | // . ┌B──┬──────────┐ └──────────┘ │ │ |
| MEDIUM | d2layouts/d2grid/layout.go | 520 | // . │ │ ┌D────────┬┐ └─────────────────┘ |
| MEDIUM | d2layouts/d2grid/layout.go | 523 | // . └───┴──────────┘ │ │ |
| MEDIUM | d2layouts/d2grid/layout.go | 525 | // . └─────────┴┘ |
| MEDIUM | d2layouts/d2grid/layout.go | 649 | // . A │ B C D │ E ┌D───────────┐ |
| MEDIUM | d2layouts/d2grid/layout.go | 650 | // . A B │ C │ D E └────────────┘ |
| MEDIUM | d2layouts/d2grid/layout.go | 651 | // . A │ B C │ D E ┌E───────────┐ |
| MEDIUM | d2layouts/d2grid/layout.go | 652 | // . A │ B │ C D E └────────────┘ |
| 81 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | e2etests/markdowntest.md | 72 | > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, |
| LOW | e2etests/markdowntest.md | 72 | > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, |
| LOW | e2etests/markdowntest.md | 81 | > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, |
| LOW | e2etests/markdowntest.md | 81 | > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, |
| LOW | e2etests/markdowntest.md | 164 | - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
| LOW | e2etests/markdowntest.md | 164 | - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
| LOW | e2etests/markdowntest.md | 172 | - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
| LOW | e2etests/markdowntest.md | 172 | - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
| LOW | e2etests/markdowntest.md | 182 | 1. This is a list item with two paragraphs. Lorem ipsum dolor |
| LOW | e2etests/markdowntest.md | 200 | only required to indent the first line. Lorem ipsum dolor |
| LOW | e2etests/stable_test.go | 1020 | 1. This is a list item with two paragraphs. Lorem ipsum dolor |
| LOW | e2etests/stable_test.go | 1038 | only required to indent the first line. Lorem ipsum dolor |
| LOW | e2etests/stable_test.go | 1073 | Lorem ipsum dolor |
| LOW | e2etests/stable_test.go | 1076 | Lorem ipsum dolor |
| LOW | e2etests/stable_test.go | 1362 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, ` + ` |
| LOW | e2etests/stable_test.go | 1362 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, ` + ` |
| LOW | e2etests/stable_test.go | 1373 | Lorem ipsum dolor sit amet, consectetur adipiscing elit,\ |
| LOW | e2etests/stable_test.go | 1373 | Lorem ipsum dolor sit amet, consectetur adipiscing elit,\ |
| LOW | …testdata/stable/giant_markdown_test/elk/board.exp.json | 43 | "label": "# Markdown: Syntax\n\n- [Overview](#overview)\n - [Philosophy](#philosophy)\n - [Inline HTML](#html)\n |
| LOW | …testdata/stable/giant_markdown_test/elk/board.exp.json | 43 | "label": "# Markdown: Syntax\n\n- [Overview](#overview)\n - [Philosophy](#philosophy)\n - [Inline HTML](#html)\n |
| LOW | …stdata/stable/giant_markdown_test/dagre/board.exp.json | 43 | "label": "# Markdown: Syntax\n\n- [Overview](#overview)\n - [Philosophy](#philosophy)\n - [Inline HTML](#html)\n |
| LOW | …stdata/stable/giant_markdown_test/dagre/board.exp.json | 43 | "label": "# Markdown: Syntax\n\n- [Overview](#overview)\n - [Philosophy](#philosophy)\n - [Inline HTML](#html)\n |
| LOW | …estdata/stable/md_backslash_newline/elk/board.exp.json | 85 | "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\\\nsed do eiusmod tempor incididunt ut labore e |
| LOW | …estdata/stable/md_backslash_newline/elk/board.exp.json | 85 | "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\\\nsed do eiusmod tempor incididunt ut labore e |
| LOW | …tdata/stable/md_backslash_newline/dagre/board.exp.json | 85 | "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\\\nsed do eiusmod tempor incididunt ut labore e |
| LOW | …tdata/stable/md_backslash_newline/dagre/board.exp.json | 85 | "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\\\nsed do eiusmod tempor incididunt ut labore e |
| LOW | …s/testdata/stable/md_2space_newline/elk/board.exp.json | 85 | "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \nsed do eiusmod tempor incididunt ut labore e |
| LOW | …s/testdata/stable/md_2space_newline/elk/board.exp.json | 85 | "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \nsed do eiusmod tempor incididunt ut labore e |
| LOW | …testdata/stable/md_2space_newline/dagre/board.exp.json | 85 | "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \nsed do eiusmod tempor incididunt ut labore e |
| LOW | …testdata/stable/md_2space_newline/dagre/board.exp.json | 85 | "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \nsed do eiusmod tempor incididunt ut labore e |
| LOW | e2etests/testdata/stable/li4/elk/board.exp.json | 43 | "label": "\nList items may consist of multiple paragraphs. Each subsequent\nparagraph in a list item must be inden |
| LOW | e2etests/testdata/stable/li4/dagre/board.exp.json | 43 | "label": "\nList items may consist of multiple paragraphs. Each subsequent\nparagraph in a list item must be inden |
| LOW | e2etests/testdata/stable/br/elk/board.exp.json | 43 | "label": "# Headline 1\n## Headline 2\nLorem ipsum dolor\n<br />\n## Headline 3\nLorem ipsum dolor\n<br />\n<br /> |
| LOW | e2etests/testdata/stable/br/dagre/board.exp.json | 43 | "label": "# Headline 1\n## Headline 2\nLorem ipsum dolor\n<br />\n## Headline 3\nLorem ipsum dolor\n<br />\n<br /> |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | install.sh | 1 | #!/bin/sh |
| LOW | install.sh | 361 | |
| LOW | install.sh | 381 | # |
| LOW | d2parser/parse.go | 21 | type ParseOptions struct { |
| LOW | d2parser/parse.go | 341 | } |
| LOW | d2ir/compile.go | 401 | for i, p := range substitution.Path { |
| LOW | d2plugin/exec.go | 21 | // execPlugin uses the binary at pathname with the plugin protocol to implement |
| LOW | d2oracle/edit.go | 361 | imported := false |
| LOW | d2ast/d2ast.go | 1 | // TODO: Remove boxes and cleanup like d2ir |
| LOW | d2ast/d2ast.go | 781 | |
| LOW | d2chaos/d2chaos_test.go | 21 | ) |
| LOW | ci/release/gen_install.sh | 1 | #!/bin/sh |
| LOW | ci/release/gen_template_lib.sh | 1 | #!/bin/sh |
| LOW | ci/release/template/scripts/lib.sh | 1 | #!/bin/sh |
| LOW | ci/release/aws/ensure.sh | 521 | # To run a pure MSYS2 shell: |
| LOW | lib/shape/shape_oval.go | 41 | paddedHeight := height + paddingY*math.Sin(theta) |
| LOW | lib/shape/shape.go | 181 | }, |
| LOW | lib/textmeasure/textmeasure.go | 41 | |
| LOW | lib/textmeasure/textmeasure.go | 61 | // Newlines, tabs and carriage returns are supported. |
| LOW | lib/textmeasure/textmeasure.go | 101 | |
| LOW | lib/geo/point.go | 221 | // Creates a Vector pointing to point |
| LOW | lib/geo/point.go | 241 | // they intersect and we compute the point of intersection to return |
| LOW | lib/geo/segment.go | 61 | // buffer says how close the segment can be, on both axes, to other segments given |
| LOW | lib/label/label.go | 561 | // Horizontal Edge with Outside Label | Vertical Edge with Outside Label |
| LOW | lib/pptx/pptx.go | 121 | // │ │ │ │ │ IMAGE |
| LOW | d2layouts/d2layouts.go | 101 | gi := NestedGraphInfo(curr) |
| LOW | d2layouts/d2dagrelayout/dagre.js | 601 | // * Internally we use an "edgeId", a stringified form of the edgeObj, to |
| LOW | d2layouts/d2grid/layout.go | 321 | gd.height = totalHeight |
| LOW | d2layouts/d2grid/layout.go | 421 | o.Width += growth |
| LOW | d2layouts/d2grid/layout.go | 461 | for _, o := range column { |
| LOW | d2layouts/d2grid/layout.go | 801 | if len(objects) < 2 || nCuts == 0 { |
| LOW | d2layouts/d2grid/layout.go | 901 | |
| LOW | d2layouts/d2grid/layout.go | 921 | // . ├─mr──┤ margin.right added to width during layout |
| LOW | d2layouts/d2grid/layout.go | 941 | // . │ widest shape here │ |
| LOW | d2layouts/d2grid/layout.go | 961 | // . ├───mr────┤ remove margin we added |
| LOW | d2layouts/d2grid/grid_diagram.go | 41 | } |
| LOW | d2layouts/d2sequence/sequence_diagram.go | 501 | note.ZIndex = NOTE_Z_INDEX |
| LOW | d2layouts/d2sequence/layout_test.go | 21 | |
| LOW | d2layouts/d2elklayout/layout.go | 1061 | } |
| LOW | d2layouts/d2elklayout/layout.go | 1081 | // │ │ │ │ ││ │ Height│ │ │ │ |
| LOW | d2renderers/d2svg/appendix/appendix.go | 21 | "oss.terrastruct.com/d2/lib/textmeasure" |
| LOW | d2renderers/d2sketch/rough.js | 1 | /*eslint-disable */ |
| LOW | d2cli/watch.go | 281 | // Benign Chmod. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | install.sh | 371 | # flag_parse implements a robust flag parser. |
| MEDIUM | e2etests-cli/main_test.go | 1721 | // getNumBoards gets the number of boards in an SVG file through a non-robust pattern search |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | …testdata/stable/giant_markdown_test/elk/board.exp.json | 43 | "label": "# Markdown: Syntax\n\n- [Overview](#overview)\n - [Philosophy](#philosophy)\n - [Inline HTML](#html)\n |
| MEDIUM | …stdata/stable/giant_markdown_test/dagre/board.exp.json | 43 | "label": "# Markdown: Syntax\n\n- [Overview](#overview)\n - [Philosophy](#philosophy)\n - [Inline HTML](#html)\n |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | d2layouts/d2dagrelayout/dagre.js | 71 | */function injectEdgeLabelProxies(g){_.forEach(g.edges(),function(e){var edge=g.edge(e);if(edge.width&&edge.height){var |
| LOW | d2layouts/d2dagrelayout/dagre.js | 288 | scanPos=0,prevLayerLength=prevLayer.length,lastNode=_.last(layer);_.forEach(layer,function(v,i){var w=findOtherInnerSegm |
| LOW | d2layouts/d2dagrelayout/dagre.js | 315 | */function findSmallestWidthAlignment(g,xss){return _.minBy(_.values(xss),function(xs){var max=Number.NEGATIVE_INFINITY |
| LOW | d2renderers/d2latex/polyfills.js | 11 | function find(e,t,n){if(void 0===n&&(n=Array.prototype),e&&"function"==typeof n.find)return n.find.call(e,t);for(var r=0 |