From b350399d665681f94921d33a0c632cb93d1887f2 Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Tue, 24 Jan 2023 03:09:40 -0800 Subject: [PATCH] d2ir: Complete integration across all packages --- d2compiler/compile.go | 48 +- d2compiler/compile_test.go | 35 +- d2graph/d2graph.go | 41 +- d2ir/d2ir.go | 59 +- d2oracle/edit.go | 1 - d2oracle/edit_test.go | 14 +- .../d2sketch/testdata/animated/sketch.exp.svg | 2 +- .../testdata/arrowheads/sketch.exp.svg | 2 +- .../d2sketch/testdata/basic/sketch.exp.svg | 2 +- .../testdata/child_to_child/sketch.exp.svg | 2 +- .../testdata/connection_label/sketch.exp.svg | 2 +- .../d2sketch/testdata/opacity/sketch.exp.svg | 12 +- .../testdata/sql_tables/sketch.exp.svg | 2 +- .../d2sketch/testdata/twitter/sketch.exp.svg | 29 +- .../diagram_wider_than_tooltip/sketch.exp.svg | 26 +- .../appendix/testdata/links/sketch.exp.svg | 2 +- .../tooltip_wider_than_diagram/sketch.exp.svg | 2 +- e2etests/e2e_test.go | 18 +- .../dagre/board.exp.json | 38 +- .../dagre/sketch.exp.svg | 23 +- .../elk/board.exp.json | 38 +- .../elk/sketch.exp.svg | 23 +- .../dagre/board.exp.json | 90 +- .../dagre/sketch.exp.svg | 2 +- .../dagre_broken_arrowhead/elk/board.exp.json | 90 +- .../dagre_broken_arrowhead/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 12 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 12 +- .../elk/sketch.exp.svg | 2 +- .../dagre_special_ids/dagre/board.exp.json | 14 +- .../dagre_special_ids/dagre/sketch.exp.svg | 2 +- .../dagre_special_ids/elk/board.exp.json | 14 +- .../dagre_special_ids/elk/sketch.exp.svg | 2 +- .../elk_alignment/dagre/board.exp.json | 28 +- .../elk_alignment/dagre/sketch.exp.svg | 2 +- .../elk_alignment/elk/board.exp.json | 28 +- .../elk_alignment/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 2 +- .../elk/sketch.exp.svg | 2 +- .../elk_loop_panic/dagre/board.exp.json | 6 +- .../elk_loop_panic/dagre/sketch.exp.svg | 2 +- .../elk_loop_panic/elk/board.exp.json | 6 +- .../elk_loop_panic/elk/sketch.exp.svg | 2 +- .../regression/elk_order/dagre/board.exp.json | 104 +- .../regression/elk_order/dagre/sketch.exp.svg | 15 +- .../regression/elk_order/elk/board.exp.json | 88 +- .../regression/elk_order/elk/sketch.exp.svg | 15 +- .../md_h1_li_li/dagre/board.exp.json | 26 +- .../md_h1_li_li/dagre/sketch.exp.svg | 15 +- .../regression/md_h1_li_li/elk/board.exp.json | 22 +- .../regression/md_h1_li_li/elk/sketch.exp.svg | 15 +- .../regression/no-lexer/dagre/board.exp.json | 6 +- .../regression/no-lexer/dagre/sketch.exp.svg | 6 +- .../regression/no-lexer/elk/board.exp.json | 6 +- .../regression/no-lexer/elk/sketch.exp.svg | 6 +- .../opacity-on-label/dagre/board.exp.json | 10 +- .../opacity-on-label/dagre/sketch.exp.svg | 8 +- .../opacity-on-label/elk/board.exp.json | 10 +- .../opacity-on-label/elk/sketch.exp.svg | 8 +- .../dagre/board.exp.json | 20 +- .../dagre/sketch.exp.svg | 2 +- .../overlapping-edge-label/elk/board.exp.json | 20 +- .../overlapping-edge-label/elk/sketch.exp.svg | 2 +- .../query_param_escape/dagre/board.exp.json | 2 +- .../query_param_escape/dagre/sketch.exp.svg | 2 +- .../query_param_escape/elk/board.exp.json | 2 +- .../query_param_escape/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 164 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 164 +- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 4 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 4 +- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 12 +- .../dagre/sketch.exp.svg | 8 +- .../elk/board.exp.json | 12 +- .../elk/sketch.exp.svg | 8 +- .../sanity/1_to_2/dagre/board.exp.json | 6 +- .../sanity/1_to_2/dagre/sketch.exp.svg | 2 +- .../testdata/sanity/1_to_2/elk/board.exp.json | 6 +- .../testdata/sanity/1_to_2/elk/sketch.exp.svg | 2 +- .../sanity/basic/dagre/board.exp.json | 4 +- .../sanity/basic/dagre/sketch.exp.svg | 2 +- .../testdata/sanity/basic/elk/board.exp.json | 4 +- .../testdata/sanity/basic/elk/sketch.exp.svg | 2 +- .../child_to_child/dagre/board.exp.json | 8 +- .../child_to_child/dagre/sketch.exp.svg | 2 +- .../sanity/child_to_child/elk/board.exp.json | 8 +- .../sanity/child_to_child/elk/sketch.exp.svg | 2 +- .../connection_label/dagre/board.exp.json | 4 +- .../connection_label/dagre/sketch.exp.svg | 2 +- .../connection_label/elk/board.exp.json | 4 +- .../connection_label/elk/sketch.exp.svg | 2 +- .../all_shapes_multiple/dagre/board.exp.json | 340 +-- .../all_shapes_multiple/dagre/sketch.exp.svg | 6 +- .../all_shapes_multiple/elk/board.exp.json | 262 +- .../all_shapes_multiple/elk/sketch.exp.svg | 6 +- .../all_shapes_shadow/dagre/board.exp.json | 340 +-- .../all_shapes_shadow/dagre/sketch.exp.svg | 14 +- .../all_shapes_shadow/elk/board.exp.json | 262 +- .../all_shapes_shadow/elk/sketch.exp.svg | 14 +- .../stable/animated/dagre/board.exp.json | 26 +- .../stable/animated/dagre/sketch.exp.svg | 2 +- .../stable/animated/elk/board.exp.json | 26 +- .../stable/animated/elk/sketch.exp.svg | 2 +- .../arrowhead_adjustment/dagre/board.exp.json | 322 ++- .../arrowhead_adjustment/dagre/sketch.exp.svg | 6 +- .../arrowhead_adjustment/elk/board.exp.json | 258 +- .../arrowhead_adjustment/elk/sketch.exp.svg | 6 +- .../arrowhead_labels/dagre/board.exp.json | 6 +- .../arrowhead_labels/dagre/sketch.exp.svg | 2 +- .../arrowhead_labels/elk/board.exp.json | 6 +- .../arrowhead_labels/elk/sketch.exp.svg | 2 +- .../stable/binary_tree/dagre/board.exp.json | 30 +- .../stable/binary_tree/dagre/sketch.exp.svg | 2 +- .../stable/binary_tree/elk/board.exp.json | 30 +- .../stable/binary_tree/elk/sketch.exp.svg | 2 +- .../stable/border-radius/dagre/board.exp.json | 4 +- .../stable/border-radius/dagre/sketch.exp.svg | 2 +- .../stable/border-radius/elk/board.exp.json | 4 +- .../stable/border-radius/elk/sketch.exp.svg | 2 +- .../stable/chaos1/dagre/board.exp.json | 82 +- .../stable/chaos1/dagre/sketch.exp.svg | 2 +- .../testdata/stable/chaos1/elk/board.exp.json | 82 +- .../testdata/stable/chaos1/elk/sketch.exp.svg | 2 +- .../stable/chaos2/dagre/board.exp.json | 14 +- .../stable/chaos2/dagre/sketch.exp.svg | 2 +- .../testdata/stable/chaos2/elk/board.exp.json | 14 +- .../testdata/stable/chaos2/elk/sketch.exp.svg | 2 +- .../child_parent_edges/dagre/board.exp.json | 184 +- .../child_parent_edges/dagre/sketch.exp.svg | 2 +- .../child_parent_edges/elk/board.exp.json | 86 +- .../child_parent_edges/elk/sketch.exp.svg | 2 +- .../circle_arrowhead/dagre/board.exp.json | 8 +- .../circle_arrowhead/dagre/sketch.exp.svg | 2 +- .../circle_arrowhead/elk/board.exp.json | 8 +- .../circle_arrowhead/elk/sketch.exp.svg | 2 +- .../circular_dependency/dagre/board.exp.json | 6 +- .../circular_dependency/dagre/sketch.exp.svg | 2 +- .../circular_dependency/elk/board.exp.json | 6 +- .../circular_dependency/elk/sketch.exp.svg | 2 +- .../stable/code_snippet/dagre/board.exp.json | 46 +- .../stable/code_snippet/dagre/sketch.exp.svg | 14 +- .../stable/code_snippet/elk/board.exp.json | 34 +- .../stable/code_snippet/elk/sketch.exp.svg | 14 +- .../connected_container/dagre/board.exp.json | 14 +- .../connected_container/dagre/sketch.exp.svg | 2 +- .../connected_container/elk/board.exp.json | 14 +- .../connected_container/elk/sketch.exp.svg | 2 +- .../constant_near_stress/dagre/board.exp.json | 28 +- .../constant_near_stress/dagre/sketch.exp.svg | 10 +- .../constant_near_stress/elk/board.exp.json | 28 +- .../constant_near_stress/elk/sketch.exp.svg | 10 +- .../constant_near_title/dagre/board.exp.json | 24 +- .../constant_near_title/dagre/sketch.exp.svg | 8 +- .../constant_near_title/elk/board.exp.json | 24 +- .../constant_near_title/elk/sketch.exp.svg | 8 +- .../container_edges/dagre/board.exp.json | 94 +- .../container_edges/dagre/sketch.exp.svg | 2 +- .../stable/container_edges/elk/board.exp.json | 94 +- .../stable/container_edges/elk/sketch.exp.svg | 2 +- .../crow_foot_arrowhead/dagre/board.exp.json | 16 +- .../crow_foot_arrowhead/dagre/sketch.exp.svg | 2 +- .../crow_foot_arrowhead/elk/board.exp.json | 16 +- .../crow_foot_arrowhead/elk/sketch.exp.svg | 2 +- .../stable/dense/dagre/board.exp.json | 34 +- .../stable/dense/dagre/sketch.exp.svg | 2 +- .../testdata/stable/dense/elk/board.exp.json | 34 +- .../testdata/stable/dense/elk/sketch.exp.svg | 2 +- .../different_subgraphs/dagre/board.exp.json | 1762 ++++++------ .../different_subgraphs/dagre/sketch.exp.svg | 6 +- .../different_subgraphs/elk/board.exp.json | 820 +++--- .../different_subgraphs/elk/sketch.exp.svg | 6 +- .../stable/direction/dagre/board.exp.json | 1691 ++++++------ .../stable/direction/dagre/sketch.exp.svg | 6 +- .../stable/direction/elk/board.exp.json | 624 ++--- .../stable/direction/elk/sketch.exp.svg | 2 +- .../stable/font_colors/dagre/board.exp.json | 4 +- .../stable/font_colors/dagre/sketch.exp.svg | 2 +- .../stable/font_colors/elk/board.exp.json | 4 +- .../stable/font_colors/elk/sketch.exp.svg | 2 +- .../stable/font_sizes/dagre/board.exp.json | 24 +- .../stable/font_sizes/dagre/sketch.exp.svg | 2 +- .../stable/font_sizes/elk/board.exp.json | 24 +- .../stable/font_sizes/elk/sketch.exp.svg | 2 +- .../giant_markdown_test/dagre/board.exp.json | 46 +- .../giant_markdown_test/dagre/sketch.exp.svg | 278 +- .../giant_markdown_test/elk/board.exp.json | 34 +- .../giant_markdown_test/elk/sketch.exp.svg | 278 +- .../testdata/stable/hr/dagre/board.exp.json | 46 +- .../testdata/stable/hr/dagre/sketch.exp.svg | 11 +- .../testdata/stable/hr/elk/board.exp.json | 34 +- .../testdata/stable/hr/elk/sketch.exp.svg | 11 +- .../stable/icon-label/dagre/board.exp.json | 2 +- .../stable/icon-label/dagre/sketch.exp.svg | 2 +- .../stable/icon-label/elk/board.exp.json | 2 +- .../stable/icon-label/elk/sketch.exp.svg | 2 +- .../stable/investigate/dagre/board.exp.json | 1636 +++++------ .../stable/investigate/dagre/sketch.exp.svg | 2 +- .../stable/investigate/elk/board.exp.json | 2186 +++++++-------- .../stable/investigate/elk/sketch.exp.svg | 18 +- .../stable/large_arch/dagre/board.exp.json | 930 +++---- .../stable/large_arch/dagre/sketch.exp.svg | 2 +- .../stable/large_arch/elk/board.exp.json | 566 ++-- .../stable/large_arch/elk/sketch.exp.svg | 2 +- .../stable/latex/dagre/board.exp.json | 154 +- .../stable/latex/dagre/sketch.exp.svg | 8 +- .../testdata/stable/latex/elk/board.exp.json | 146 +- .../testdata/stable/latex/elk/sketch.exp.svg | 8 +- .../testdata/stable/li1/dagre/board.exp.json | 46 +- .../testdata/stable/li1/dagre/sketch.exp.svg | 19 +- .../testdata/stable/li1/elk/board.exp.json | 34 +- .../testdata/stable/li1/elk/sketch.exp.svg | 19 +- .../testdata/stable/li2/dagre/board.exp.json | 46 +- .../testdata/stable/li2/dagre/sketch.exp.svg | 22 +- .../testdata/stable/li2/elk/board.exp.json | 34 +- .../testdata/stable/li2/elk/sketch.exp.svg | 22 +- .../testdata/stable/li3/dagre/board.exp.json | 46 +- .../testdata/stable/li3/dagre/sketch.exp.svg | 40 +- .../testdata/stable/li3/elk/board.exp.json | 34 +- .../testdata/stable/li3/elk/sketch.exp.svg | 40 +- .../testdata/stable/li4/dagre/board.exp.json | 46 +- .../testdata/stable/li4/dagre/sketch.exp.svg | 45 +- .../testdata/stable/li4/elk/board.exp.json | 34 +- .../testdata/stable/li4/elk/sketch.exp.svg | 45 +- .../stable/links/dagre/board.exp.json | 4 +- .../stable/links/dagre/sketch.exp.svg | 2 +- .../testdata/stable/links/elk/board.exp.json | 4 +- .../testdata/stable/links/elk/sketch.exp.svg | 2 +- .../stable/lone_h1/dagre/board.exp.json | 46 +- .../stable/lone_h1/dagre/sketch.exp.svg | 8 +- .../stable/lone_h1/elk/board.exp.json | 34 +- .../stable/lone_h1/elk/sketch.exp.svg | 8 +- .../stable/markdown/dagre/board.exp.json | 46 +- .../stable/markdown/dagre/sketch.exp.svg | 21 +- .../stable/markdown/elk/board.exp.json | 34 +- .../stable/markdown/elk/sketch.exp.svg | 21 +- .../markdown_stroke_fill/dagre/board.exp.json | 44 +- .../markdown_stroke_fill/dagre/sketch.exp.svg | 24 +- .../markdown_stroke_fill/elk/board.exp.json | 34 +- .../markdown_stroke_fill/elk/sketch.exp.svg | 24 +- .../md_2space_newline/dagre/board.exp.json | 16 +- .../md_2space_newline/dagre/sketch.exp.svg | 9 +- .../md_2space_newline/elk/board.exp.json | 16 +- .../md_2space_newline/elk/sketch.exp.svg | 9 +- .../md_backslash_newline/dagre/board.exp.json | 16 +- .../md_backslash_newline/dagre/sketch.exp.svg | 9 +- .../md_backslash_newline/elk/board.exp.json | 16 +- .../md_backslash_newline/elk/sketch.exp.svg | 9 +- .../md_code_block_fenced/dagre/board.exp.json | 46 +- .../md_code_block_fenced/dagre/sketch.exp.svg | 19 +- .../md_code_block_fenced/elk/board.exp.json | 34 +- .../md_code_block_fenced/elk/sketch.exp.svg | 19 +- .../dagre/board.exp.json | 46 +- .../dagre/sketch.exp.svg | 20 +- .../md_code_block_indented/elk/board.exp.json | 34 +- .../md_code_block_indented/elk/sketch.exp.svg | 20 +- .../md_code_inline/dagre/board.exp.json | 12 +- .../md_code_inline/dagre/sketch.exp.svg | 11 +- .../stable/md_code_inline/elk/board.exp.json | 12 +- .../stable/md_code_inline/elk/sketch.exp.svg | 11 +- .../multiline_text/dagre/board.exp.json | 2 +- .../multiline_text/dagre/sketch.exp.svg | 2 +- .../stable/multiline_text/elk/board.exp.json | 2 +- .../stable/multiline_text/elk/sketch.exp.svg | 2 +- .../multiple_trees/dagre/board.exp.json | 46 +- .../multiple_trees/dagre/sketch.exp.svg | 2 +- .../stable/multiple_trees/elk/board.exp.json | 46 +- .../stable/multiple_trees/elk/sketch.exp.svg | 2 +- .../stable/n22_e32/dagre/board.exp.json | 42 +- .../stable/n22_e32/dagre/sketch.exp.svg | 2 +- .../stable/n22_e32/elk/board.exp.json | 42 +- .../stable/n22_e32/elk/sketch.exp.svg | 2 +- .../stable/near-alone/dagre/board.exp.json | 6 +- .../stable/near-alone/dagre/sketch.exp.svg | 2 +- .../stable/near-alone/elk/board.exp.json | 6 +- .../stable/near-alone/elk/sketch.exp.svg | 2 +- .../number_connections/dagre/board.exp.json | 86 +- .../number_connections/dagre/sketch.exp.svg | 2 +- .../number_connections/elk/board.exp.json | 102 +- .../number_connections/elk/sketch.exp.svg | 2 +- .../one_container_loop/dagre/board.exp.json | 94 +- .../one_container_loop/dagre/sketch.exp.svg | 2 +- .../one_container_loop/elk/board.exp.json | 94 +- .../one_container_loop/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 14 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 14 +- .../elk/sketch.exp.svg | 2 +- .../dagre/.!73950!sketch.exp.svg | 42 + .../dagre/board.exp.json | 106 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 88 +- .../elk/sketch.exp.svg | 2 +- .../testdata/stable/p/dagre/board.exp.json | 32 +- .../testdata/stable/p/dagre/sketch.exp.svg | 11 +- e2etests/testdata/stable/p/elk/board.exp.json | 24 +- e2etests/testdata/stable/p/elk/sketch.exp.svg | 11 +- .../testdata/stable/pre/dagre/board.exp.json | 46 +- .../testdata/stable/pre/dagre/sketch.exp.svg | 21 +- .../testdata/stable/pre/elk/board.exp.json | 34 +- .../testdata/stable/pre/elk/sketch.exp.svg | 21 +- .../self-referencing/dagre/board.exp.json | 6 +- .../self-referencing/dagre/sketch.exp.svg | 2 +- .../self-referencing/elk/board.exp.json | 6 +- .../self-referencing/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 156 +- .../dagre/sketch.exp.svg | 6 +- .../elk/board.exp.json | 156 +- .../elk/sketch.exp.svg | 6 +- .../dagre/board.exp.json | 12 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 12 +- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 208 +- .../dagre/sketch.exp.svg | 27 +- .../elk/board.exp.json | 208 +- .../elk/sketch.exp.svg | 27 +- .../dagre/board.exp.json | 4 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 4 +- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 442 +-- .../dagre/sketch.exp.svg | 16 +- .../elk/board.exp.json | 442 +-- .../elk/sketch.exp.svg | 16 +- .../dagre/board.exp.json | 254 +- .../dagre/sketch.exp.svg | 6 +- .../elk/board.exp.json | 254 +- .../elk/sketch.exp.svg | 6 +- .../dagre/board.exp.json | 996 +++---- .../dagre/sketch.exp.svg | 12 +- .../elk/board.exp.json | 996 +++---- .../elk/sketch.exp.svg | 12 +- .../dagre/board.exp.json | 106 +- .../dagre/sketch.exp.svg | 6 +- .../elk/board.exp.json | 106 +- .../elk/sketch.exp.svg | 6 +- .../dagre/board.exp.json | 242 +- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_note/elk/board.exp.json | 242 +- .../sequence_diagram_note/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 616 ++--- .../dagre/sketch.exp.svg | 18 +- .../sequence_diagram_real/elk/board.exp.json | 616 ++--- .../sequence_diagram_real/elk/sketch.exp.svg | 18 +- .../dagre/board.exp.json | 346 +-- .../dagre/sketch.exp.svg | 10 +- .../elk/board.exp.json | 346 +-- .../elk/sketch.exp.svg | 10 +- .../dagre/board.exp.json | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 2 +- .../elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 168 +- .../dagre/sketch.exp.svg | 2 +- .../sequence_diagram_span/elk/board.exp.json | 168 +- .../sequence_diagram_span/elk/sketch.exp.svg | 2 +- .../sequence_diagrams/dagre/board.exp.json | 2458 ++++++++--------- .../sequence_diagrams/dagre/sketch.exp.svg | 54 +- .../sequence_diagrams/elk/board.exp.json | 1922 ++++++------- .../sequence_diagrams/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 2 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 2 +- .../elk/sketch.exp.svg | 2 +- .../stable/sql_tables/dagre/board.exp.json | 6 +- .../stable/sql_tables/dagre/sketch.exp.svg | 2 +- .../stable/sql_tables/elk/board.exp.json | 6 +- .../stable/sql_tables/elk/sketch.exp.svg | 2 +- .../stable/square_3d/dagre/board.exp.json | 28 +- .../stable/square_3d/dagre/sketch.exp.svg | 10 +- .../stable/square_3d/elk/board.exp.json | 24 +- .../stable/square_3d/elk/sketch.exp.svg | 10 +- .../dagre/board.exp.json | 50 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 50 +- .../elk/sketch.exp.svg | 2 +- .../stable/stylish/dagre/board.exp.json | 4 +- .../stable/stylish/dagre/sketch.exp.svg | 2 +- .../stable/stylish/elk/board.exp.json | 4 +- .../stable/stylish/elk/sketch.exp.svg | 2 +- .../stable/tooltips/dagre/board.exp.json | 4 +- .../stable/tooltips/dagre/sketch.exp.svg | 2 +- .../stable/tooltips/elk/board.exp.json | 4 +- .../stable/tooltips/elk/sketch.exp.svg | 2 +- .../transparent_3d/dagre/board.exp.json | 2 +- .../transparent_3d/dagre/sketch.exp.svg | 2 +- .../stable/transparent_3d/elk/board.exp.json | 2 +- .../stable/transparent_3d/elk/sketch.exp.svg | 2 +- .../unnamed_only_height/dagre/board.exp.json | 12 +- .../unnamed_only_height/dagre/sketch.exp.svg | 4 +- .../unnamed_only_height/elk/board.exp.json | 12 +- .../unnamed_only_height/elk/sketch.exp.svg | 4 +- .../unnamed_only_width/dagre/board.exp.json | 30 +- .../unnamed_only_width/dagre/sketch.exp.svg | 8 +- .../unnamed_only_width/elk/board.exp.json | 22 +- .../unnamed_only_width/elk/sketch.exp.svg | 8 +- .../stable/us_map/dagre/board.exp.json | 256 +- .../stable/us_map/dagre/sketch.exp.svg | 2 +- .../testdata/stable/us_map/elk/board.exp.json | 256 +- .../testdata/stable/us_map/elk/sketch.exp.svg | 2 +- .../container_child_edge/dagre/board.exp.json | 6 +- .../container_child_edge/dagre/sketch.exp.svg | 2 +- .../container_child_edge/elk/board.exp.json | 6 +- .../container_child_edge/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 10 +- .../dagre/sketch.exp.svg | 2 +- .../elk/board.exp.json | 10 +- .../elk/sketch.exp.svg | 2 +- .../font_sizes_large/dagre/board.exp.json | 10 +- .../font_sizes_large/dagre/sketch.exp.svg | 2 +- .../todo/font_sizes_large/elk/board.exp.json | 10 +- .../todo/font_sizes_large/elk/sketch.exp.svg | 2 +- .../dagre/board.exp.json | 122 +- .../dagre/sketch.exp.svg | 16 +- .../elk/board.exp.json | 122 +- .../elk/sketch.exp.svg | 16 +- .../dagre/board.exp.json | 391 ++- .../dagre/sketch.exp.svg | 786 +++++- .../shape_set_width_height/elk/board.exp.json | 387 ++- .../shape_set_width_height/elk/sketch.exp.svg | 786 +++++- .../todo/tall_edge_label/dagre/board.exp.json | 4 +- .../todo/tall_edge_label/dagre/sketch.exp.svg | 2 +- .../todo/tall_edge_label/elk/board.exp.json | 4 +- .../todo/tall_edge_label/elk/sketch.exp.svg | 2 +- go.mod | 12 +- go.sum | 413 +-- .../d2compiler/TestCompile/3d_oval.exp.json | 2 +- .../TestCompile/basic_icon.exp.json | 11 +- .../TestCompile/basic_sequence.exp.json | 9 +- .../TestCompile/basic_shape.exp.json | 9 +- .../TestCompile/basic_style.exp.json | 13 +- .../TestCompile/blank_underscore.exp.json | 2 +- .../TestCompile/class_paren.exp.json | 11 +- .../TestCompile/class_style.exp.json | 11 +- .../TestCompile/constraint_label.exp.json | 11 +- .../TestCompile/default_direction.exp.json | 11 +- .../TestCompile/default_orientation.exp.json | 100 - .../TestCompile/dimension_with_style.exp.json | 13 +- .../dimensions_on_nonimage.exp.json | 9 +- testdata/d2compiler/TestCompile/edge.exp.json | 17 +- .../edge_arrowhead_fields.exp.json | 23 +- .../TestCompile/edge_chain.exp.json | 25 +- .../TestCompile/edge_chain_map.exp.json | 25 +- .../TestCompile/edge_column_index.exp.json | 19 +- .../TestCompile/edge_exclusive_style.exp.json | 17 +- .../TestCompile/edge_flat_arrowhead.exp.json | 20 +- .../edge_flat_label_arrowhead.exp.json | 20 +- .../TestCompile/edge_in_column.exp.json | 140 +- .../TestCompile/edge_index.exp.json | 17 +- .../TestCompile/edge_index_map.exp.json | 17 +- .../TestCompile/edge_index_nested.exp.json | 24 +- .../edge_index_nested_cross_scope.exp.json | 26 +- .../edge_key_group_flat_nested.exp.json | 26 +- ..._key_group_flat_nested_underscore.exp.json | 170 +- ..._group_map_flat_nested_underscore.exp.json | 170 +- ...e_key_group_map_nested_underscore.exp.json | 170 +- .../TestCompile/edge_label_map.exp.json | 17 +- .../d2compiler/TestCompile/edge_map.exp.json | 17 +- .../TestCompile/edge_map_arrowhead.exp.json | 20 +- .../TestCompile/edge_map_group_flat.exp.json | 17 +- .../edge_map_group_semiflat.exp.json | 17 +- .../TestCompile/edge_map_nested.exp.json | 17 +- .../TestCompile/edge_map_nested_flat.exp.json | 17 +- .../edge_map_non_reserved.exp.json | 4 +- .../TestCompile/edge_mixed_arrowhead.exp.json | 23 +- .../edge_non_shape_arrowhead.exp.json | 20 +- .../edge_semiflat_arrowhead.exp.json | 20 +- .../errors/reserved_icon_style.exp.json | 8 +- .../TestCompile/escaped_id.exp.json | 11 +- .../TestCompile/image_dimensions.exp.json | 253 -- .../TestCompile/image_non_style.exp.json | 2 +- .../TestCompile/image_style.exp.json | 11 +- .../TestCompile/invalid_orientation.exp.json | 12 - .../TestCompile/near_bad_connected.exp.json | 4 +- .../TestCompile/near_bad_constant.exp.json | 4 +- .../TestCompile/near_bad_container.exp.json | 4 +- .../TestCompile/near_constant.exp.json | 13 +- .../TestCompile/nested_edge.exp.json | 4 +- .../TestCompile/nested_near_constant.exp.json | 4 +- .../TestCompile/nested_sql.exp.json | 18 +- testdata/d2compiler/TestCompile/null.exp.json | 11 +- .../d2compiler/TestCompile/path_link.exp.json | 11 +- .../reserved_icon_near_style.exp.json | 24 +- .../TestCompile/root_direction.exp.json | 4 + .../TestCompile/root_orientation.exp.json | 66 - .../TestCompile/root_sequence.exp.json | 4 + .../TestCompile/self-referencing.exp.json | 12 +- .../TestCompile/sequence_container.exp.json | 1063 +++++++ .../TestCompile/sequence_container_2.exp.json | 928 +++++++ .../sequence_grouped_note.exp.json | 34 +- .../TestCompile/sequence_scoping.exp.json | 54 +- .../TestCompile/set_direction.exp.json | 11 +- .../TestCompile/set_orientation.exp.json | 139 - .../d2compiler/TestCompile/shape.exp.json | 134 - .../single_dimension_on_circle.exp.json | 9 +- .../d2compiler/TestCompile/sql-panic.exp.json | 2 +- .../TestCompile/sql-regression.exp.json | 25 +- .../d2compiler/TestCompile/sql_paren.exp.json | 11 +- .../TestCompile/stroke-width.exp.json | 13 +- .../d2compiler/TestCompile/style.exp.json | 145 - .../table_connection_attr.exp.json | 19 +- .../TestCompile/table_style.exp.json | 11 +- .../TestCompile/table_style_map.exp.json | 36 +- .../TestCompile/underscore_edge.exp.json | 19 +- .../underscore_edge_chain.exp.json | 27 +- .../underscore_edge_existing.exp.json | 111 +- .../underscore_edge_existing_new.exp.json | 346 --- .../underscore_edge_index.exp.json | 170 +- .../underscore_edge_nested.exp.json | 26 +- .../underscore_edge_reference.exp.json | 336 --- .../TestCompile/underscore_parent.exp.json | 181 -- .../underscore_parent_create.exp.json | 18 +- .../underscore_parent_middle_path.exp.json | 4 +- .../underscore_parent_not_root.exp.json | 25 +- .../underscore_parent_preference.exp.json | 245 -- .../underscore_parent_preference_1.exp.json | 20 +- .../underscore_parent_preference_2.exp.json | 20 +- .../underscore_parent_root.exp.json | 4 +- .../underscore_parent_sandwich_path.exp.json | 4 +- .../underscore_parent_squared.exp.json | 25 +- .../underscore_unresolved_obj.exp.json | 18 +- .../TestCompile/unescaped_id_cr.exp.json | 11 +- .../d2compiler/TestCompile/url_link.exp.json | 11 +- .../TestCompile/wrong_column_index.exp.json | 19 +- .../TestCompile2/scenarios/recursive.exp.json | 695 +++++ .../scenarios/{one.exp.json => root.exp.json} | 435 ++- .../TestExport/connection/arrowhead.exp.json | 6 +- .../TestExport/connection/basic.exp.json | 4 +- .../connection/stroke-dash.exp.json | 4 +- .../connection/theme_stroke-dash.exp.json | 4 +- .../TestExport/label/basic_shape.exp.json | 2 +- .../label/connection_font_color.exp.json | 4 +- .../label/shape_font_color.exp.json | 2 +- .../TestExport/shape/basic.exp.json | 2 +- .../TestExport/shape/border-radius.exp.json | 2 +- .../shape/sequence_group_position.exp.json | 6 +- .../TestExport/shape/text_color.exp.json | 2 +- .../theme/connection_with_bold.exp.json | 4 +- .../theme/connection_with_italic.exp.json | 4 +- .../theme/connection_without_italic.exp.json | 4 +- .../theme/shape_with_italic.exp.json | 2 +- .../theme/shape_without_bold.exp.json | 2 +- .../d2ir/TestCompile/edges/chain.exp.json | 1036 +++---- .../d2ir/TestCompile/edges/nested.exp.json | 590 ++-- testdata/d2ir/TestCompile/edges/root.exp.json | 222 +- .../TestCompile/edges/underscore.exp.json | 292 +- .../d2ir/TestCompile/fields/array.exp.json | 4 +- .../d2ir/TestCompile/fields/label.exp.json | 4 +- .../d2ir/TestCompile/fields/nested.exp.json | 8 +- .../d2ir/TestCompile/fields/null.exp.json | 8 +- .../fields/primary/nested.exp.json | 12 +- .../TestCompile/fields/primary/root.exp.json | 8 +- .../d2ir/TestCompile/fields/root.exp.json | 4 +- .../d2ir/TestCompile/layers/root.exp.json | 242 +- .../d2ir/TestCompile/scenarios/root.exp.json | 694 ++--- .../d2ir/TestCompile/steps/recursive.exp.json | 956 +++---- testdata/d2ir/TestCompile/steps/root.exp.json | 706 ++--- testdata/d2oracle/TestCreate/base.exp.json | 11 +- .../d2oracle/TestCreate/container.exp.json | 18 +- .../TestCreate/container_edge.exp.json | 24 +- .../TestCreate/container_edge_label.exp.json | 24 +- testdata/d2oracle/TestCreate/edge.exp.json | 17 +- .../d2oracle/TestCreate/edge_nested.exp.json | 24 +- .../d2oracle/TestCreate/edge_scope.exp.json | 24 +- .../TestCreate/edge_scope_flat.exp.json | 24 +- .../TestCreate/edge_scope_nested.exp.json | 31 +- .../d2oracle/TestCreate/edge_unique.exp.json | 105 +- testdata/d2oracle/TestCreate/gen_key.exp.json | 18 +- .../d2oracle/TestCreate/gen_key_n.exp.json | 102 +- .../TestCreate/gen_key_nested.exp.json | 45 +- .../TestCreate/gen_key_scope.exp.json | 39 +- .../TestCreate/gen_key_suffix.exp.json | 18 +- .../TestCreate/make_scope_multiline.exp.json | 16 +- .../make_scope_multiline_spacing_1.exp.json | 30 +- .../make_scope_multiline_spacing_2.exp.json | 30 +- testdata/d2oracle/TestCreate/nested.exp.json | 25 +- testdata/d2oracle/TestCreate/scope.exp.json | 32 +- .../TestDelete/breakup_arrowhead.exp.json | 11 +- .../d2oracle/TestDelete/children.exp.json | 24 +- .../TestDelete/children_conflicts.exp.json | 18 +- .../children_edge_conflicts.exp.json | 148 +- .../children_edges_flat_conflicts.exp.json | 369 +-- .../children_flat_conflicts.exp.json | 20 +- .../children_multiple_conflicts.exp.json | 151 +- .../children_nested_conflicts.exp.json | 25 +- ...ldren_nested_referenced_conflicts.exp.json | 31 +- .../children_no_self_conflict.exp.json | 11 +- .../TestDelete/children_order.exp.json | 32 +- .../children_referenced_conflicts.exp.json | 20 +- .../TestDelete/children_scope.exp.json | 38 +- .../TestDelete/container_near.exp.json | 29 +- .../d2oracle/TestDelete/delete_icon.exp.json | 18 +- .../d2oracle/TestDelete/delete_link.exp.json | 11 +- .../d2oracle/TestDelete/delete_near.exp.json | 18 +- .../delete_needed_flat_near.exp.json | 18 +- .../delete_redundant_flat_near.exp.json | 18 +- .../TestDelete/delete_tooltip.exp.json | 11 +- .../edge_both_identical_childs.exp.json | 27 +- .../d2oracle/TestDelete/edge_common.exp.json | 17 +- .../TestDelete/edge_common_2.exp.json | 17 +- .../TestDelete/edge_common_3.exp.json | 27 +- .../TestDelete/edge_common_4.exp.json | 27 +- .../TestDelete/edge_conflict.exp.json | 113 +- .../TestDelete/edge_decrement.exp.json | 26 +- .../d2oracle/TestDelete/edge_first.exp.json | 53 +- .../TestDelete/edge_flat_style.exp.json | 11 +- .../TestDelete/edge_identical_child.exp.json | 32 +- .../TestDelete/edge_key_style.exp.json | 17 +- .../d2oracle/TestDelete/edge_last.exp.json | 141 +- .../TestDelete/edge_map_style.exp.json | 17 +- .../d2oracle/TestDelete/edge_middle.exp.json | 59 +- .../d2oracle/TestDelete/empty_map.exp.json | 18 +- testdata/d2oracle/TestDelete/flat.exp.json | 4 + .../TestDelete/flat_reserved.exp.json | 17 +- .../TestDelete/hoist_children.exp.json | 18 +- .../TestDelete/hoist_edge_children.exp.json | 24 +- .../TestDelete/key_with_edges.exp.json | 27 +- .../TestDelete/key_with_edges_2.exp.json | 18 +- .../TestDelete/key_with_edges_3.exp.json | 18 +- .../TestDelete/key_with_edges_4.exp.json | 27 +- .../d2oracle/TestDelete/multi_near.exp.json | 36 +- .../multi_path_map_conflict.exp.json | 27 +- .../multi_path_map_no_conflict.exp.json | 25 +- .../multiple_flat_middle_container.exp.json | 27 +- .../TestDelete/multiple_flat_style.exp.json | 13 +- .../TestDelete/multiple_map_styles.exp.json | 13 +- testdata/d2oracle/TestDelete/near.exp.json | 11 +- testdata/d2oracle/TestDelete/nested.exp.json | 25 +- .../d2oracle/TestDelete/nested_2.exp.json | 25 +- .../TestDelete/nested_edge_key_style.exp.json | 24 +- .../TestDelete/nested_flat_style.exp.json | 11 +- .../TestDelete/nested_reserved.exp.json | 29 +- .../nested_underscore_update.exp.json | 18 +- .../d2oracle/TestDelete/node_in_edge.exp.json | 212 +- .../TestDelete/node_in_edge_last.exp.json | 350 +-- .../only_delete_edge_reserved.exp.json | 21 +- .../only_delete_obj_reserved.exp.json | 21 +- testdata/d2oracle/TestDelete/order_1.exp.json | 24 +- testdata/d2oracle/TestDelete/order_2.exp.json | 18 +- testdata/d2oracle/TestDelete/order_3.exp.json | 18 +- testdata/d2oracle/TestDelete/order_4.exp.json | 11 +- testdata/d2oracle/TestDelete/order_5.exp.json | 37 +- testdata/d2oracle/TestDelete/order_6.exp.json | 34 +- testdata/d2oracle/TestDelete/order_7.exp.json | 41 +- testdata/d2oracle/TestDelete/order_8.exp.json | 39 +- .../d2oracle/TestDelete/shape_class.exp.json | 11 +- .../TestDelete/shape_sql_table.exp.json | 26 +- .../TestDelete/singular_flat_style.exp.json | 11 +- .../TestDelete/singular_map_style.exp.json | 11 +- .../underscore_no_conflict.exp.json | 105 +- .../TestDelete/underscore_remove.exp.json | 37 +- .../TestMove/append_multiple_styles.exp.json | 22 +- testdata/d2oracle/TestMove/basic.exp.json | 11 +- .../d2oracle/TestMove/basic_nested.exp.json | 18 +- .../TestMove/basic_out_of_container.exp.json | 18 +- .../TestMove/between_containers.exp.json | 25 +- .../TestMove/chain_connected_nested.exp.json | 111 +- ..._connected_nested_no_extra_create.exp.json | 30 +- .../TestMove/connected_nested.exp.json | 108 +- .../d2oracle/TestMove/container_near.exp.json | 48 +- .../TestMove/edge_across_containers.exp.json | 151 +- .../d2oracle/TestMove/edge_basic.exp.json | 17 +- .../TestMove/edge_chain_basic.exp.json | 25 +- .../TestMove/edge_chain_circular.exp.json | 149 +- .../edge_chain_into_container.exp.json | 70 +- .../edge_chain_out_container.exp.json | 114 +- .../d2oracle/TestMove/edge_conflict.exp.json | 204 +- .../TestMove/edge_into_container.exp.json | 31 +- .../TestMove/edge_nested_basic.exp.json | 24 +- .../TestMove/edge_out_of_container.exp.json | 106 +- .../d2oracle/TestMove/extend_map.exp.json | 34 +- .../TestMove/extend_stationary_path.exp.json | 31 +- .../TestMove/flat_between_containers.exp.json | 25 +- .../d2oracle/TestMove/flat_merge.exp.json | 32 +- .../TestMove/flat_middle_container.exp.json | 32 +- .../TestMove/flat_nested_merge.exp.json | 74 +- .../flat_nested_merge_multiple_refs.exp.json | 236 +- .../flat_reparent_with_map_value.exp.json | 16 +- ...lat_reparent_with_mixed_map_value.exp.json | 23 +- .../flat_reparent_with_value.exp.json | 18 +- .../d2oracle/TestMove/flat_style.exp.json | 22 +- .../TestMove/full_edge_slice.exp.json | 218 +- .../d2oracle/TestMove/full_slice.exp.json | 25 +- testdata/d2oracle/TestMove/gnarly_1.exp.json | 987 +++---- .../hoist_container_children.exp.json | 32 +- .../into_container_existing_map.exp.json | 25 +- .../into_container_nonexisting_map.exp.json | 18 +- .../into_container_with_flat_keys.exp.json | 20 +- .../into_container_with_flat_style.exp.json | 20 +- .../d2oracle/TestMove/map_transplant.exp.json | 34 +- .../d2oracle/TestMove/map_with_label.exp.json | 25 +- .../TestMove/merge_nested_maps.exp.json | 148 +- .../d2oracle/TestMove/merge_reserved.exp.json | 52 +- .../TestMove/middle_container.exp.json | 25 +- .../TestMove/move_container_children.exp.json | 39 +- .../move_container_conflict_children.exp.json | 39 +- .../move_into_key_with_value.exp.json | 18 +- .../TestMove/move_out_of_edge.exp.json | 123 +- .../TestMove/move_out_of_nested_edge.exp.json | 507 ++-- .../TestMove/multiple_nesting_levels.exp.json | 65 +- testdata/d2oracle/TestMove/near.exp.json | 20 +- .../d2oracle/TestMove/nhooyr_one.exp.json | 32 +- .../d2oracle/TestMove/nhooyr_two.exp.json | 293 +- .../d2oracle/TestMove/parentheses.exp.json | 170 +- .../TestMove/partial_edge_slice.exp.json | 64 +- .../d2oracle/TestMove/partial_slice.exp.json | 18 +- testdata/d2oracle/TestMove/rename_2.exp.json | 39 +- testdata/d2oracle/TestMove/reuse_map.exp.json | 41 +- .../d2oracle/TestMove/slice_style.exp.json | 20 +- .../TestMove/underscore_children.exp.json | 20 +- .../underscore_edge_children.exp.json | 168 +- .../underscore_edge_container_1.exp.json | 24 +- .../underscore_edge_container_2.exp.json | 24 +- .../underscore_edge_container_3.exp.json | 106 +- .../underscore_edge_container_4.exp.json | 24 +- .../underscore_edge_container_5.exp.json | 24 +- .../TestMove/underscore_edge_split.exp.json | 66 +- .../TestMove/underscore_merge.exp.json | 27 +- .../TestMove/underscore_split.exp.json | 32 +- .../TestMove/underscore_split_out.exp.json | 41 +- .../TestMove/underscore_transplant.exp.json | 25 +- .../d2oracle/TestMove/unique_name.exp.json | 36 +- .../unique_name_with_references.exp.json | 120 +- testdata/d2oracle/TestRename/arrows.exp.json | 17 +- .../d2oracle/TestRename/arrows_chain.exp.json | 33 +- .../TestRename/arrows_complex.exp.json | 49 +- .../TestRename/arrows_trim_common.exp.json | 40 +- .../TestRename/arrows_trim_common_2.exp.json | 38 +- .../TestRename/complex_edge_1.exp.json | 49 +- .../TestRename/complex_edge_2.exp.json | 49 +- .../d2oracle/TestRename/conflict.exp.json | 18 +- .../d2oracle/TestRename/conflict_2.exp.json | 39 +- .../TestRename/conflict_with_dots.exp.json | 18 +- .../d2oracle/TestRename/container.exp.json | 751 ++--- testdata/d2oracle/TestRename/edges.exp.json | 470 ++-- testdata/d2oracle/TestRename/flat.exp.json | 11 +- .../d2oracle/TestRename/generated.exp.json | 11 +- testdata/d2oracle/TestRename/near.exp.json | 20 +- testdata/d2oracle/TestRename/nested.exp.json | 49 +- testdata/d2oracle/TestSet/base.exp.json | 11 +- .../TestSet/block_string_multiline.exp.json | 11 +- .../TestSet/block_string_oneline.exp.json | 11 +- testdata/d2oracle/TestSet/edge.exp.json | 17 +- .../TestSet/edge_append_style.exp.json | 17 +- testdata/d2oracle/TestSet/edge_chain.exp.json | 32 +- .../TestSet/edge_chain_append_style.exp.json | 25 +- .../edge_chain_existing_style.exp.json | 25 +- .../TestSet/edge_chain_nested_set.exp.json | 32 +- .../d2oracle/TestSet/edge_index_case.exp.json | 124 +- .../TestSet/edge_index_nested.exp.json | 24 +- .../TestSet/edge_key_and_key.exp.json | 24 +- testdata/d2oracle/TestSet/edge_label.exp.json | 17 +- .../TestSet/edge_merge_style.exp.json | 17 +- .../TestSet/edge_nested_label_set.exp.json | 24 +- .../TestSet/edge_nested_style_set.exp.json | 24 +- .../TestSet/expanded_map_style.exp.json | 13 +- testdata/d2oracle/TestSet/icon.exp.json | 11 +- .../d2oracle/TestSet/inline_style.exp.json | 13 +- testdata/d2oracle/TestSet/label.exp.json | 11 +- .../d2oracle/TestSet/label_primary.exp.json | 24 +- .../d2oracle/TestSet/label_replace.exp.json | 11 +- .../d2oracle/TestSet/label_unset.exp.json | 11 +- .../d2oracle/TestSet/map_key_missing.exp.json | 57 +- .../d2oracle/TestSet/nested_alex.exp.json | 146 +- testdata/d2oracle/TestSet/new_style.exp.json | 13 +- .../d2oracle/TestSet/replace_shape.exp.json | 9 +- .../d2oracle/TestSet/replace_style.exp.json | 13 +- .../TestSet/replace_style_edgecase.exp.json | 15 +- testdata/d2oracle/TestSet/shape.exp.json | 9 +- .../TestSet/shape_nested_style_set.exp.json | 13 +- 781 files changed, 31567 insertions(+), 26574 deletions(-) create mode 100644 e2etests/testdata/stable/overlapping_image_container_labels/dagre/.!73950!sketch.exp.svg delete mode 100644 testdata/d2compiler/TestCompile/default_orientation.exp.json delete mode 100644 testdata/d2compiler/TestCompile/image_dimensions.exp.json delete mode 100644 testdata/d2compiler/TestCompile/invalid_orientation.exp.json delete mode 100644 testdata/d2compiler/TestCompile/root_orientation.exp.json create mode 100644 testdata/d2compiler/TestCompile/sequence_container.exp.json create mode 100644 testdata/d2compiler/TestCompile/sequence_container_2.exp.json delete mode 100644 testdata/d2compiler/TestCompile/set_orientation.exp.json delete mode 100644 testdata/d2compiler/TestCompile/shape.exp.json delete mode 100644 testdata/d2compiler/TestCompile/style.exp.json delete mode 100644 testdata/d2compiler/TestCompile/underscore_edge_existing_new.exp.json delete mode 100644 testdata/d2compiler/TestCompile/underscore_edge_reference.exp.json delete mode 100644 testdata/d2compiler/TestCompile/underscore_parent.exp.json delete mode 100644 testdata/d2compiler/TestCompile/underscore_parent_preference.exp.json create mode 100644 testdata/d2compiler/TestCompile2/scenarios/recursive.exp.json rename testdata/d2compiler/TestCompile2/scenarios/{one.exp.json => root.exp.json} (54%) diff --git a/d2compiler/compile.go b/d2compiler/compile.go index 4ab8e37b4..8afb333a8 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -155,9 +155,14 @@ func (c *compiler) compileField(obj *d2graph.Object, f *d2ir.Field) { c.compileMap(obj, f.Map()) } + if obj.Attributes.Label.MapKey == nil { + obj.Attributes.Label.MapKey = f.LastPrimaryKey() + } for _, fr := range f.References { - if fr.OurValue() && fr.Context.Key.Value.Map != nil { - obj.Map = fr.Context.Key.Value.Map + if fr.Primary() { + if fr.Context.Key.Value.Map != nil { + obj.Map = fr.Context.Key.Value.Map + } } scopeObjIDA := d2ir.IDA(fr.Context.ScopeMap) scopeObj, _ := obj.Graph.Root.HasChild(scopeObjIDA) @@ -358,9 +363,10 @@ func (c *compiler) compileEdge(obj *d2graph.Object, e *d2ir.Edge) { } } + edge.Attributes.Label.MapKey = e.LastPrimaryKey() for _, er := range e.References { scopeObjIDA := d2ir.IDA(er.Context.ScopeMap) - scopeObj, _ := edge.Src.Graph.Root.HasChild(scopeObjIDA) + scopeObj, _ := edge.Src.Graph.Root.HasChild(d2graphIDA(scopeObjIDA)) edge.References = append(edge.References, d2graph.EdgeReference{ Edge: er.Context.Edge, MapKey: er.Context.Key, @@ -532,44 +538,34 @@ func (c *compiler) validateKeys(obj *d2graph.Object, m *d2ir.Map) { func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) { keyword := strings.ToLower(f.Name) - _, isReserved := d2graph.SimpleReservedKeywords[keyword] + _, isReserved := d2graph.ReservedKeywords[keyword] if isReserved { switch obj.Attributes.Shape.Value { case d2target.ShapeSQLTable, d2target.ShapeClass: default: if len(obj.Children) > 0 && (f.Name == "width" || f.Name == "height") { - c.errorf(f.LastPrimaryKey(), mk.Range.End, fmt.Sprintf("%s cannot be used on container: %s", f.Name, obj.AbsID())) + c.errorf(f.LastPrimaryKey(), fmt.Sprintf("%s cannot be used on container: %s", f.Name, obj.AbsID())) } } switch obj.Attributes.Shape.Value { case d2target.ShapeCircle, d2target.ShapeSquare: - checkEqual := (reserved == "width" && obj.Attributes.Height != nil) || (reserved == "height" && obj.Attributes.Width != nil) + checkEqual := (keyword == "width" && obj.Attributes.Height != nil) || (keyword == "height" && obj.Attributes.Width != nil) if checkEqual && obj.Attributes.Width.Value != obj.Attributes.Height.Value { c.errorf(f.LastPrimaryKey(), "width and height must be equal for %s shapes", obj.Attributes.Shape.Value) } } switch f.Name { - case "width": - if obj.Attributes.Shape.Value != d2target.ShapeImage { - c.errorf(f.LastPrimaryKey(), "width is only applicable to image shapes.") - } - case "height": - if obj.Attributes.Shape.Value != d2target.ShapeImage { - c.errorf(f.LastPrimaryKey(), "height is only applicable to image shapes.") + case "style": + if obj.Attributes.Style.ThreeDee != nil { + if !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeSquare) && !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeRectangle) { + c.errorf(obj.Attributes.Style.ThreeDee.MapKey, `key "3d" can only be applied to squares and rectangles`) + } } case "shape": - switch obj.Attributes.Shape.Value { - case d2target.ShapeSQLTable, d2target.ShapeClass: - case d2target.ShapeImage: - if obj.Attributes.Icon == nil { - c.errorf(f.LastPrimaryKey(), `image shape must include an "icon" field`) - } - default: - if len(obj.Children) > 0 && (f.Name == "width" || f.Name == "height") { - c.errorf(f.LastPrimaryKey(), fmt.Sprintf("%s cannot be used on container: %s", f.Name, obj.AbsID())) - } + if obj.Attributes.Shape.Value == d2target.ShapeImage && obj.Attributes.Icon == nil { + c.errorf(f.LastPrimaryKey(), `image shape must include an "icon" field`) } in := d2target.IsShape(obj.Attributes.Shape.Value) @@ -581,12 +577,6 @@ func (c *compiler) validateKey(obj *d2graph.Object, f *d2ir.Field) { return } - if obj.Attributes.Style.ThreeDee != nil { - if !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeSquare) && !strings.EqualFold(obj.Attributes.Shape.Value, d2target.ShapeRectangle) { - c.errorf(obj.Attributes.Style.ThreeDee.MapKey, `key "3d" can only be applied to squares and rectangles`) - } - } - if obj.Attributes.Shape.Value == d2target.ShapeImage { c.errorf(f.LastRef().AST(), "image shapes cannot have children.") return diff --git a/d2compiler/compile_test.go b/d2compiler/compile_test.go index ca993db6c..3168c53f0 100644 --- a/d2compiler/compile_test.go +++ b/d2compiler/compile_test.go @@ -124,8 +124,7 @@ x: { } `, expErr: `d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:3:2: width and height must be equal for circle shapes -d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:4:2: width and height must be equal for circle shapes -`, +d2/testdata/d2compiler/TestCompile/equal_dimensions_on_circle.d2:4:2: width and height must be equal for circle shapes`, }, { name: "single_dimension_on_circle", @@ -208,8 +207,7 @@ d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:16:3: height c d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:25:3: width cannot be used on container: containers.oval container d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:26:3: height cannot be used on container: containers.oval container d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:36:3: width cannot be used on container: containers.hexagon container -d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:37:3: height cannot be used on container: containers.hexagon container -`, +d2/testdata/d2compiler/TestCompile/no_dimensions_on_containers.d2:37:3: height cannot be used on container: containers.hexagon container`, }, { name: "dimension_with_style", @@ -1753,6 +1751,35 @@ choo: { tassert.Equal(t, 3, len(g.Root.ChildrenArray)) }, }, + { + name: "sequence_container", + + text: `shape: sequence_diagram +x.y.q -> j.y.p +ok: { + x.y.q -> j.y.p +} +`, + assertions: func(t *testing.T, g *d2graph.Graph) { + tassert.Equal(t, 7, len(g.Objects)) + tassert.Equal(t, 3, len(g.Root.ChildrenArray)) + }, + }, + { + name: "sequence_container_2", + + text: `shape: sequence_diagram +x.y.q +ok: { + x.y.q -> j.y.p + meow +} +`, + assertions: func(t *testing.T, g *d2graph.Graph) { + tassert.Equal(t, 8, len(g.Objects)) + tassert.Equal(t, 2, len(g.Root.ChildrenArray)) + }, + }, { name: "root_direction", diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index a685ae963..222149eab 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -497,6 +497,9 @@ func (obj *Object) newObject(id string) *Object { Label: Scalar{ Value: idval, }, + Shape: Scalar{ + Value: d2target.ShapeRectangle, + }, }, Graph: obj.Graph, @@ -649,25 +652,34 @@ func (obj *Object) ensureChildEdge(ids []string) *Object { // EnsureChild grabs the child by ids or creates it if it does not exist including all // intermediate nodes. -func (obj *Object) EnsureChild(ids []string) *Object { - _, is := ReservedKeywordHolders[ids[0]] - if len(ids) == 1 && !is { - _, ok := ReservedKeywords[ids[0]] +func (obj *Object) EnsureChild(ida []string) *Object { + seq := obj.OuterSequenceDiagram() + if seq != nil { + for _, c := range seq.ChildrenArray { + if c.ID == ida[0] { + obj = seq + break + } + } + } + _, is := ReservedKeywordHolders[ida[0]] + if len(ida) == 1 && !is { + _, ok := ReservedKeywords[ida[0]] if ok { return obj } } - id := ids[0] - ids = ids[1:] + id := ida[0] + ida = ida[1:] child, ok := obj.Children[strings.ToLower(id)] if !ok { child = obj.newObject(id) } - if len(ids) >= 1 { - return child.EnsureChild(ids) + if len(ida) >= 1 { + return child.EnsureChild(ida) } return child } @@ -944,15 +956,6 @@ func (e *Edge) AbsID() string { } func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label string) (*Edge, error) { - srcObj, srcID, err := ResolveUnderscoreKey(srcID, obj) - if err != nil { - return nil, err - } - dstObj, dstID, err := ResolveUnderscoreKey(dstID, obj) - if err != nil { - return nil, err - } - for _, id := range [][]string{srcID, dstID} { for _, p := range id { if _, ok := ReservedKeywords[p]; ok { @@ -961,8 +964,8 @@ func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label } } - src := srcObj.ensureChildEdge(srcID) - dst := dstObj.ensureChildEdge(dstID) + src := obj.ensureChildEdge(srcID) + dst := obj.ensureChildEdge(dstID) if src.OuterSequenceDiagram() != dst.OuterSequenceDiagram() { return nil, errors.New("connections within sequence diagrams can connect only to other objects within the same sequence diagram") diff --git a/d2ir/d2ir.go b/d2ir/d2ir.go index 7f59ca207..3540536fc 100644 --- a/d2ir/d2ir.go +++ b/d2ir/d2ir.go @@ -116,6 +116,7 @@ type Reference interface { reference() // Most specific AST node for the reference. AST() d2ast.Node + Primary() bool } var _ Reference = &FieldReference{} @@ -214,7 +215,11 @@ func (m *Map) Root() bool { if !ok { return false } - return f.Name == "" + return f.Root() +} + +func (f *Field) Root() bool { + return f.parent == nil } type LayerKind string @@ -237,7 +242,7 @@ func NodeLayerKind(n Node) LayerKind { f = ParentField(n) case *Map: f = ParentField(n) - if f.Name == "" { + if f.Root() { return LayerLayer } f = ParentField(f) @@ -286,7 +291,7 @@ func (f *Field) Copy(newParent Node) Node { func (f *Field) lastPrimaryRef() *FieldReference { for i := len(f.References) - 1; i >= 0; i-- { - if f.References[i].OurValue() { + if f.References[i].Primary() { return f.References[i] } } @@ -485,13 +490,13 @@ type FieldReference struct { Context *RefContext `json:"context"` } -// OurValue returns true if the Value in Context.Key.Value corresponds to the Field +// Primary returns true if the Value in Context.Key.Value corresponds to the Field // represented by String. -func (fr *FieldReference) OurValue() bool { +func (fr *FieldReference) Primary() bool { if fr.KeyPath == fr.Context.Key.Key { - return fr.KeyPathIndex() == len(fr.KeyPath.Path)-1 + return len(fr.Context.Key.Edges) == 0 && fr.KeyPathIndex() == len(fr.KeyPath.Path)-1 } else if fr.KeyPath == fr.Context.Key.EdgeKey { - return fr.KeyPathIndex() == len(fr.KeyPath.Path)-1 + return len(fr.Context.Key.Edges) == 1 && fr.KeyPathIndex() == len(fr.KeyPath.Path)-1 } return false } @@ -529,6 +534,12 @@ func (er *EdgeReference) AST() d2ast.Node { return er.Context.Edge } +// Primary returns true if the Value in Context.Key.Value corresponds to the *Edge +// represented by Context.Edge +func (er *EdgeReference) Primary() bool { + return len(er.Context.Key.Edges) == 1 && er.Context.Key.EdgeKey == nil +} + type RefContext struct { Edge *d2ast.Edge `json:"edge"` Key *d2ast.Key `json:"key"` @@ -653,11 +664,14 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext) (*Field, continue } - f.References = append(f.References, &FieldReference{ - String: kp.Path[i].Unbox(), - KeyPath: kp, - Context: refctx, - }) + // Don't add references for fake common KeyPath from trimCommon in CreateEdge. + if refctx != nil { + f.References = append(f.References, &FieldReference{ + String: kp.Path[i].Unbox(), + KeyPath: kp, + Context: refctx, + }) + } if i+1 == len(kp.Path) { return f, nil @@ -676,11 +690,14 @@ func (m *Map) ensureField(i int, kp *d2ast.KeyPath, refctx *RefContext) (*Field, f := &Field{ parent: m, Name: head, - References: []*FieldReference{{ + } + // Don't add references for fake common KeyPath from trimCommon in CreateEdge. + if refctx != nil { + f.References = append(f.References, &FieldReference{ String: kp.Path[i].Unbox(), KeyPath: kp, Context: refctx, - }}, + }) } m.Fields = append(m.Fields, f) if i+1 == len(kp.Path) { @@ -755,7 +772,7 @@ func (m *Map) CreateEdge(eid *EdgeID, refctx *RefContext) (*Edge, error) { tmp := *refctx.Edge.Src kp := &tmp kp.Path = kp.Path[:len(common)] - f, err := m.EnsureField(kp, refctx) + f, err := m.EnsureField(kp, nil) if err != nil { return nil, err } @@ -1003,15 +1020,25 @@ func IDA(n Node) (ida []string) { for { f, ok := n.(*Field) if ok { - if f.Name == "" { + if f.Root() { + reverseIDA(ida) return ida } ida = append(ida, f.Name) } f = ParentField(n) if f == nil { + reverseIDA(ida) return ida } n = f } } + +func reverseIDA(ida []string) { + for i := 0; i < len(ida)/2; i++ { + tmp := ida[i] + ida[i] = ida[len(ida)-i-1] + ida[len(ida)-i-1] = tmp + } +} diff --git a/d2oracle/edit.go b/d2oracle/edit.go index 7fa3e8ccb..5d928d86a 100644 --- a/d2oracle/edit.go +++ b/d2oracle/edit.go @@ -391,7 +391,6 @@ func Delete(g *d2graph.Graph, key string) (_ *d2graph.Graph, err error) { if g != g2 { return g2, nil } - g = g2 if len(mk.Edges) == 1 { obj := g.Root diff --git a/d2oracle/edit_test.go b/d2oracle/edit_test.go index 7feba4572..dd3b430fc 100644 --- a/d2oracle/edit_test.go +++ b/d2oracle/edit_test.go @@ -1373,12 +1373,12 @@ more.(ok.q.z -> p.k): "furbling, v.:" { name: "complex_edge_1", - text: `a.b.(x -> y).q.z + text: `a.b.(x -> y).style.animated `, key: "a.b", newName: "ooo", - exp: `a.ooo.(x -> y).q.z + exp: `a.ooo.(x -> y).style.animated `, assertions: func(t *testing.T, g *d2graph.Graph) { if len(g.Objects) != 4 { @@ -1392,12 +1392,12 @@ more.(ok.q.z -> p.k): "furbling, v.:" { name: "complex_edge_2", - text: `a.b.(x -> y).q.z + text: `a.b.(x -> y).style.animated `, key: "a.b.x", newName: "papa", - exp: `a.b.(papa -> y).q.z + exp: `a.b.(papa -> y).style.animated `, assertions: func(t *testing.T, g *d2graph.Graph) { if len(g.Objects) != 4 { @@ -1454,12 +1454,12 @@ more.(ok.q.z -> p.k): "furbling, v.:" { name: "arrows_complex", - text: `a.b.(x -- y).q.z + text: `a.b.(x -- y).style.animated `, key: "a.b.(x -- y)[0]", newName: "(x <-> y)[0]", - exp: `a.b.(x <-> y).q.z + exp: `a.b.(x <-> y).style.animated `, assertions: func(t *testing.T, g *d2graph.Graph) { if len(g.Objects) != 4 { @@ -3025,7 +3025,7 @@ d if err == nil { objectsAfter := len(g.Objects) if objectsBefore != objectsAfter { - println(d2format.Format(g.AST)) + t.Log(d2format.Format(g.AST)) return nil, fmt.Errorf("move cannot destroy or create objects: found %d objects before and %d objects after", objectsBefore, objectsAfter) } } diff --git a/d2renderers/d2sketch/testdata/animated/sketch.exp.svg b/d2renderers/d2sketch/testdata/animated/sketch.exp.svg index 79cea04c6..f50aa2142 100644 --- a/d2renderers/d2sketch/testdata/animated/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/animated/sketch.exp.svg @@ -51,7 +51,7 @@ width="561" height="982" viewBox="-102 -102 561 982"> \ No newline at end of file diff --git a/e2etests/testdata/regression/elk_img_empty_label_panic/elk/board.exp.json b/e2etests/testdata/regression/elk_img_empty_label_panic/elk/board.exp.json index e37d0a2b3..2a47be779 100644 --- a/e2etests/testdata/regression/elk_img_empty_label_panic/elk/board.exp.json +++ b/e2etests/testdata/regression/elk_img_empty_label_panic/elk/board.exp.json @@ -54,7 +54,7 @@ }, { "id": "ico", - "type": "", + "type": "rectangle", "pos": { "x": 160, "y": 26 diff --git a/e2etests/testdata/regression/elk_img_empty_label_panic/elk/sketch.exp.svg b/e2etests/testdata/regression/elk_img_empty_label_panic/elk/sketch.exp.svg index 6f53328fa..b66955ecf 100644 --- a/e2etests/testdata/regression/elk_img_empty_label_panic/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/elk_img_empty_label_panic/elk/sketch.exp.svg @@ -39,7 +39,7 @@ width="452" height="332" viewBox="-90 -90 452 332"> \ No newline at end of file diff --git a/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json b/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json index ca5d11974..4db9f807e 100644 --- a/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json +++ b/e2etests/testdata/regression/elk_loop_panic/dagre/board.exp.json @@ -4,7 +4,7 @@ "shapes": [ { "id": "x", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 0 @@ -44,7 +44,7 @@ }, { "id": "x.a", - "type": "", + "type": "rectangle", "pos": { "x": 50, "y": 50 @@ -84,7 +84,7 @@ }, { "id": "x.b", - "type": "", + "type": "rectangle", "pos": { "x": 263, "y": 50 diff --git a/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg b/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg index 48ca96d52..4ca1c4d4d 100644 --- a/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/elk_loop_panic/dagre/sketch.exp.svg @@ -39,7 +39,7 @@ width="630" height="430" viewBox="-102 -102 630 430">

Oldest message

-

Offset

-

Last message

-

Next message will be
-inserted here

-
M0M1M2M3M4M5M6 - +

m0_desc

+

m2_desc

+

m5_desc

+

m6_desc

+
M0M1M2M3M4M5M6 +

Oldest message

-

Offset

-

Last message

-

Next message will be
-inserted here

-
M0M1M2M3M4M5M6 - +

m0_desc

+

m2_desc

+

m5_desc

+

m6_desc

+
M0M1M2M3M4M5M6 +

hey

-
    -
  • they -
      -
    1. they
    2. -
    -
  • -
-
ab - +

md

+
ab +

hey

-
    -
  • they -
      -
    1. they
    2. -
    -
  • -
-
ab - +

md

+
ab + x

linux: because a PC is a terrible thing to waste

-
a You don't have to know how the computer works,just how to work the computer. - +x

y

+
a You don't have to know how the computer works,just how to work the computer. + x

linux: because a PC is a terrible thing to waste

-
a You don't have to know how the computer works,just how to work the computer. - +x

y

+
a You don't have to know how the computer works,just how to work the computer. + aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 diff --git a/e2etests/testdata/stable/chaos2/elk/board.exp.json b/e2etests/testdata/stable/chaos2/elk/board.exp.json index 4c3490841..9a58a20cc 100644 --- a/e2etests/testdata/stable/chaos2/elk/board.exp.json +++ b/e2etests/testdata/stable/chaos2/elk/board.exp.json @@ -4,7 +4,7 @@ "shapes": [ { "id": "aa", - "type": "", + "type": "rectangle", "pos": { "x": 12, "y": 12 @@ -44,7 +44,7 @@ }, { "id": "aa.bb", - "type": "", + "type": "rectangle", "pos": { "x": 87, "y": 815 @@ -84,7 +84,7 @@ }, { "id": "aa.bb.cc", - "type": "", + "type": "rectangle", "pos": { "x": 423, "y": 1271 @@ -203,7 +203,7 @@ }, { "id": "aa.bb.cc.dd.ff", - "type": "", + "type": "rectangle", "pos": { "x": 609, "y": 1421 @@ -282,7 +282,7 @@ }, { "id": "aa.bb.cc.hh", - "type": "", + "type": "rectangle", "pos": { "x": 522, "y": 2090 @@ -442,7 +442,7 @@ }, { "id": "aa.ll", - "type": "", + "type": "rectangle", "pos": { "x": 612, "y": 363 @@ -561,7 +561,7 @@ }, { "id": "aa.oo", - "type": "", + "type": "rectangle", "pos": { "x": 689, "y": 87 diff --git a/e2etests/testdata/stable/chaos2/elk/sketch.exp.svg b/e2etests/testdata/stable/chaos2/elk/sketch.exp.svg index e1498a328..f9e32197d 100644 --- a/e2etests/testdata/stable/chaos2/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/chaos2/elk/sketch.exp.svg @@ -796,7 +796,7 @@ width="1275" height="2738" viewBox="-90 -90 1275 2738">aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 +aabbllmmnnoocciikkddgghhjjeeff1122 334455667788 diff --git a/e2etests/testdata/stable/child_parent_edges/dagre/board.exp.json b/e2etests/testdata/stable/child_parent_edges/dagre/board.exp.json index 29604db23..6404a9b86 100644 --- a/e2etests/testdata/stable/child_parent_edges/dagre/board.exp.json +++ b/e2etests/testdata/stable/child_parent_edges/dagre/board.exp.json @@ -4,7 +4,7 @@ "shapes": [ { "id": "a", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 0 @@ -44,7 +44,7 @@ }, { "id": "a.b", - "type": "", + "type": "rectangle", "pos": { "x": 40, "y": 50 @@ -84,7 +84,7 @@ }, { "id": "a.b.c", - "type": "", + "type": "rectangle", "pos": { "x": 80, "y": 100 @@ -124,7 +124,7 @@ }, { "id": "a.b.c.d", - "type": "", + "type": "rectangle", "pos": { "x": 130, "y": 150 @@ -165,11 +165,11 @@ ], "connections": [ { - "id": "(a.b -> a)[0]", + "id": "a.(b -> b.c)[0]", "src": "a.b", "srcArrow": "none", "srcLabel": "", - "dst": "a", + "dst": "a.b.c", "dstArrow": "triangle", "dstLabel": "", "opacity": 1, @@ -248,90 +248,6 @@ "icon": null, "zIndex": 0 }, - { - "id": "a.(b -> b.c)[0]", - "src": "a.b", - "srcArrow": "none", - "srcLabel": "", - "dst": "a.b.c", - "dstArrow": "triangle", - "dstLabel": "", - "opacity": 1, - "strokeDash": 0, - "strokeWidth": 2, - "stroke": "#0D32B2", - "label": "", - "fontSize": 16, - "fontFamily": "DEFAULT", - "language": "", - "color": "#676C7E", - "italic": true, - "bold": false, - "underline": false, - "labelWidth": 0, - "labelHeight": 0, - "labelPosition": "", - "labelPercentage": 0, - "route": [ - { - "x": 244, - "y": 182.30769230769232 - }, - { - "x": 292, - "y": 156.46153846153845 - }, - { - "x": 307, - "y": 150 - }, - { - "x": 311.5, - "y": 150 - }, - { - "x": 316, - "y": 150 - }, - { - "x": 322, - "y": 162.6 - }, - { - "x": 326.5, - "y": 181.5 - }, - { - "x": 331, - "y": 200.4 - }, - { - "x": 331, - "y": 225.6 - }, - { - "x": 326.5, - "y": 244.5 - }, - { - "x": 322, - "y": 263.4 - }, - { - "x": 292, - "y": 269.53846153846155 - }, - { - "x": 244, - "y": 243.69230769230768 - } - ], - "isCurve": true, - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 0 - }, { "id": "a.(b.c.d -> b)[0]", "src": "a.b.c.d", @@ -358,14 +274,98 @@ "labelPercentage": 0, "route": [ { - "x": 243.66666666666669, - "y": 238 + "x": 244, + "y": 244 + }, + { + "x": 244, + "y": 243.69230769230768 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "(a.b -> a)[0]", + "src": "a.b", + "srcArrow": "none", + "srcLabel": "", + "dst": "a", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "", + "labelPercentage": 0, + "route": [ + { + "x": 244, + "y": 188.0046403712297 + }, + { + "x": 313.33333333333337, + "y": 157.60092807424593 + }, + { + "x": 335, + "y": 150 + }, + { + "x": 341.5, + "y": 150 + }, + { + "x": 348, + "y": 150 + }, + { + "x": 356.66666666666663, + "y": 162.6 + }, + { + "x": 363.16666666666663, + "y": 181.5 + }, + { + "x": 369.6666666666667, + "y": 200.4 + }, + { + "x": 369.6666666666667, + "y": 225.6 + }, + { + "x": 363.16666666666663, + "y": 244.5 + }, + { + "x": 356.66666666666663, + "y": 263.4 + }, + { + "x": 313.33333333333337, + "y": 268.3990719257541 }, { "x": 244, "y": 237.9953596287703 } ], + "isCurve": true, "animated": false, "tooltip": "", "icon": null, diff --git a/e2etests/testdata/stable/child_parent_edges/dagre/sketch.exp.svg b/e2etests/testdata/stable/child_parent_edges/dagre/sketch.exp.svg index 7bc1e8325..c6231a92e 100644 --- a/e2etests/testdata/stable/child_parent_edges/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/child_parent_edges/dagre/sketch.exp.svg @@ -39,7 +39,7 @@ width="698" height="630" viewBox="-102 -102 698 630">xyThe top of the mountain

Cats, no less liquid than their shadows, offer no angles to the wind.

-

If we can't fix it, it ain't broke.

-

Dieters live life in the fasting lane.

-
JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +xyThe top of the mountain

bottom

+
JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + xyThe top of the mountain

Cats, no less liquid than their shadows, offer no angles to the wind.

-

If we can't fix it, it ain't broke.

-

Dieters live life in the fasting lane.

-
JoeDonaldi am top lefti am top righti am bottom lefti am bottom right - +xyThe top of the mountain

bottom

+
JoeDonaldi am top lefti am top righti am bottom lefti am bottom right + poll the peopleresultsunfavorablefavorablewill of the people

A winning strategy

-
- +poll the peopleresultsunfavorablefavorablewill of the people

title

+
+ poll the peopleresultsunfavorablefavorablewill of the people

A winning strategy

-
- +poll the peopleresultsunfavorablefavorablewill of the people

title

+
+

Markdown: Syntax

- -

Note: This document is itself written using Markdown; you -can see the source for it by adding '.text' to the URL.

-
-

Overview

-

Philosophy

-

Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

-

Readability, however, is emphasized above all else. A Markdown-formatted -document should be publishable as-is, as plain text, without looking -like it's been marked up with tags or formatting instructions. While -Markdown's syntax has been influenced by several existing text-to-HTML -filters -- including Setext, atx, Textile, reStructuredText, -Grutatext, and EtText -- the single biggest source of -inspiration for Markdown's syntax is the format of plain text email.

-

Block Elements

-

Paragraphs and Line Breaks

-

A paragraph is simply one or more consecutive lines of text, separated -by one or more blank lines. (A blank line is any line that looks like a -blank line -- a line containing nothing but spaces or tabs is considered -blank.) Normal paragraphs should not be indented with spaces or tabs.

-

The implication of the "one or more consecutive lines of text" rule is -that Markdown supports "hard-wrapped" text paragraphs. This differs -significantly from most other text-to-HTML formatters (including Movable -Type's "Convert Line Breaks" option) which translate every line break -end a line with two or more spaces, then type return.

-

Headers

-

Markdown supports two styles of headers, [Setext] [1] and [atx] [2].

-

Optionally, you may "close" atx-style headers. This is purely -cosmetic -- you can use this if you think it looks better. The -closing hashes don't even need to match the number of hashes -used to open the header. (The number of opening hashes -determines the header level.)

-

Blockquotes

-

familiar with quoting passages of text in an email message, then you -know how to create a blockquote in Markdown. It looks best if you hard

-
-

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, -consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. -Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

-

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse -id sem consectetuer libero luctus adipiscing.

-
-

line of a hard-wrapped paragraph:

-
-

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, -consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. -Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

-
-
-

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse -id sem consectetuer libero luctus adipiscing.

-
-

Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by

-
-

This is the first level of quoting.

-
-

This is nested blockquote.

-
-

Back to the first level.

-
-

Blockquotes can contain other Markdown elements, including headers, lists, -and code blocks:

-
-

This is a header.

-
    -
  1. This is the first list item.
  2. -
  3. This is the second list item.
  4. -
-

Here's some example code:

-
return shell_exec("echo $input  $markdown_script");
-
-
-

Any decent text editor should make email-style quoting easy. For -example, with BBEdit, you can make a selection and choose Increase -Quote Level from the Text menu.

-

Lists

-

Markdown supports ordered (numbered) and unordered (bulleted) lists.

-

Unordered lists use asterisks, pluses, and hyphens -- interchangably --- as list markers:

-
    -
  • Red
  • -
  • Green
  • -
  • Blue
  • -
-

is equivalent to:

-
    -
  • Red
  • -
  • Green
  • -
  • Blue
  • -
-

and:

-
    -
  • Red
  • -
  • Green
  • -
  • Blue
  • -
-

Ordered lists use numbers followed by periods:

-
    -
  1. Bird
  2. -
  3. McHale
  4. -
  5. Parish
  6. -
-

It's important to note that the actual numbers you use to mark the -list have no effect on the HTML output Markdown produces. The HTML -Markdown produces from the above list is:

-

If you instead wrote the list in Markdown like this:

-
    -
  1. Bird
  2. -
  3. McHale
  4. -
  5. Parish
  6. -
-

or even:

-
    -
  1. Bird
  2. -
  3. McHale
  4. -
  5. Parish
  6. -
-

you'd get the exact same HTML output. The point is, if you want to, -you can use ordinal numbers in your ordered Markdown lists, so that -the numbers in your source match the numbers in your published HTML. -But if you want to be lazy, you don't have to.

-

To make lists look nice, you can wrap items with hanging indents:

-
    -
  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. -Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, -viverra nec, fringilla in, laoreet vitae, risus.
  • -
  • Donec sit amet nisl. Aliquam semper ipsum sit amet velit. -Suspendisse id sem consectetuer libero luctus adipiscing.
  • -
-

But if you want to be lazy, you don't have to:

-
    -
  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. -Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, -viverra nec, fringilla in, laoreet vitae, risus.
  • -
  • Donec sit amet nisl. Aliquam semper ipsum sit amet velit. -Suspendisse id sem consectetuer libero luctus adipiscing.
  • -
-

List items may consist of multiple paragraphs. Each subsequent -paragraph in a list item must be indented by either 4 spaces -or one tab:

-
    -
  1. -

    This is a list item with two paragraphs. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit. Aliquam hendrerit -mi posuere lectus.

    -

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet -vitae, risus. Donec sit amet nisl. Aliquam semper ipsum -sit amet velit.

    -
  2. -
  3. -

    Suspendisse id sem consectetuer libero luctus adipiscing.

    -
  4. -
-

It looks nice if you indent every line of the subsequent -paragraphs, but here again, Markdown will allow you to be -lazy:

-
    -
  • -

    This is a list item with two paragraphs.

    -
    This is the second paragraph in the list item. You're
    -
    -

    only required to indent the first line. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit.

    -
  • -
  • -

    Another item in the same list.

    -
  • -
-

delimiters need to be indented:

-
    -
  • -

    A list item with a blockquote:

    -
    -

    This is a blockquote -inside a list item.

    -
    -
  • -
-

To put a code block within a list item, the code block needs -to be indented twice -- 8 spaces or two tabs:

-
    -
  • A list item with a code block:
  • -
-

Code Blocks

-

Pre-formatted code blocks are used for writing about programming or -markup source code. Rather than forming normal paragraphs, the lines -of a code block are interpreted literally. Markdown wraps a code block

-

To produce a code block in Markdown, simply indent every line of the -block by at least 4 spaces or 1 tab.

-

This is a normal paragraph:

-
This is a code block.
-
-

Here is an example of AppleScript:

-
tell application "Foo"
-    beep
-end tell
-
-

A code block continues until it reaches a line that is not indented -(or the end of the article).

-

are automatically converted into HTML entities. This makes it very -easy to include example HTML source code using Markdown -- just paste -it and indent it, and Markdown will handle the hassle of encoding the -ampersands and angle brackets. For example, this:

-

Regular Markdown syntax is not processed within code blocks. E.g., -asterisks are just literal asterisks within a code block. This means -it's also easy to use Markdown to write about Markdown's own syntax.

-

Span Elements

-

Links

-

Markdown supports two style of links: inline and reference.

-

In both styles, the link text is delimited by [square brackets].

-

To create an inline link, use a set of regular parentheses immediately -after the link text's closing square bracket. Inside the parentheses, -put the URL where you want the link to point, along with an optional -title for the link, surrounded in quotes. For example:

-

This is an example inline link.

-

This link has no title attribute.

-

Emphasis

-

single asterisks

-

single underscores

-

double asterisks

-

double underscores

-

Code

-

Unlike a pre-formatted code block, a code span indicates code within a -normal paragraph. For example:

-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/giant_markdown_test/elk/board.exp.json b/e2etests/testdata/stable/giant_markdown_test/elk/board.exp.json index 52ab0e1e9..80332ab06 100644 --- a/e2etests/testdata/stable/giant_markdown_test/elk/board.exp.json +++ b/e2etests/testdata/stable/giant_markdown_test/elk/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 12, + "x": 57, "y": 238 }, - "width": 3051, - "height": 4853, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "# Markdown: Syntax\n\n- [Overview](#overview)\n - [Philosophy](#philosophy)\n - [Inline HTML](#html)\n - [Automatic Escaping for Special Characters](#autoescape)\n- [Block Elements](#block)\n - [Paragraphs and Line Breaks](#p)\n - [Headers](#header)\n - [Blockquotes](#blockquote)\n - [Lists](#list)\n - [Code Blocks](#precode)\n - [Horizontal Rules](#hr)\n- [Span Elements](#span)\n - [Links](#link)\n - [Emphasis](#em)\n - [Code](#code)\n - [Images](#img)\n- [Miscellaneous](#misc)\n - [Backslash Escapes](#backslash)\n - [Automatic Links](#autolink)\n\n**Note:** This document is itself written using Markdown; you\ncan [see the source for it by adding '.text' to the URL](/projects/markdown/syntax.text).\n\n---\n\n## Overview\n\n### Philosophy\n\nMarkdown is intended to be as easy-to-read and easy-to-write as is feasible.\n\nReadability, however, is emphasized above all else. A Markdown-formatted\ndocument should be publishable as-is, as plain text, without looking\nlike it's been marked up with tags or formatting instructions. While\nMarkdown's syntax has been influenced by several existing text-to-HTML\nfilters -- including [Setext](http://docutils.sourceforge.net/mirror/setext.html), [atx](http://www.aaronsw.com/2002/atx/), [Textile](http://textism.com/tools/textile/), [reStructuredText](http://docutils.sourceforge.net/rst.html),\n[Grutatext](http://www.triptico.com/software/grutatxt.html), and [EtText](http://ettext.taint.org/doc/) -- the single biggest source of\ninspiration for Markdown's syntax is the format of plain text email.\n\n## Block Elements\n\n### Paragraphs and Line Breaks\n\nA paragraph is simply one or more consecutive lines of text, separated\nby one or more blank lines. (A blank line is any line that looks like a\nblank line -- a line containing nothing but spaces or tabs is considered\nblank.) Normal paragraphs should not be indented with spaces or tabs.\n\nThe implication of the \"one or more consecutive lines of text\" rule is\nthat Markdown supports \"hard-wrapped\" text paragraphs. This differs\nsignificantly from most other text-to-HTML formatters (including Movable\nType's \"Convert Line Breaks\" option) which translate every line break\nend a line with two or more spaces, then type return.\n\n### Headers\n\nMarkdown supports two styles of headers, [Setext] [1] and [atx] [2].\n\nOptionally, you may \"close\" atx-style headers. This is purely\ncosmetic -- you can use this if you think it looks better. The\nclosing hashes don't even need to match the number of hashes\nused to open the header. (The number of opening hashes\ndetermines the header level.)\n\n### Blockquotes\n\nfamiliar with quoting passages of text in an email message, then you\nknow how to create a blockquote in Markdown. It looks best if you hard\n\n> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,\n> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.\n> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.\n>\n> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse\n> id sem consectetuer libero luctus adipiscing.\n\nline of a hard-wrapped paragraph:\n\n> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,\n> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.\n> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.\n\n> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse\n> id sem consectetuer libero luctus adipiscing.\n\nBlockquotes can be nested (i.e. a blockquote-in-a-blockquote) by\n\n> This is the first level of quoting.\n>\n> > This is nested blockquote.\n>\n> Back to the first level.\n\nBlockquotes can contain other Markdown elements, including headers, lists,\nand code blocks:\n\n> ## This is a header.\n>\n> 1. This is the first list item.\n> 2. This is the second list item.\n>\n> Here's some example code:\n>\n> return shell_exec(\"echo $input $markdown_script\");\n\nAny decent text editor should make email-style quoting easy. For\nexample, with BBEdit, you can make a selection and choose Increase\nQuote Level from the Text menu.\n\n### Lists\n\nMarkdown supports ordered (numbered) and unordered (bulleted) lists.\n\nUnordered lists use asterisks, pluses, and hyphens -- interchangably\n-- as list markers:\n\n- Red\n- Green\n- Blue\n\nis equivalent to:\n\n- Red\n- Green\n- Blue\n\nand:\n\n- Red\n- Green\n- Blue\n\nOrdered lists use numbers followed by periods:\n\n1. Bird\n2. McHale\n3. Parish\n\nIt's important to note that the actual numbers you use to mark the\nlist have no effect on the HTML output Markdown produces. The HTML\nMarkdown produces from the above list is:\n\nIf you instead wrote the list in Markdown like this:\n\n1. Bird\n1. McHale\n1. Parish\n\nor even:\n\n3. Bird\n1. McHale\n1. Parish\n\nyou'd get the exact same HTML output. The point is, if you want to,\nyou can use ordinal numbers in your ordered Markdown lists, so that\nthe numbers in your source match the numbers in your published HTML.\nBut if you want to be lazy, you don't have to.\n\nTo make lists look nice, you can wrap items with hanging indents:\n\n- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\n Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,\n viverra nec, fringilla in, laoreet vitae, risus.\n- Donec sit amet nisl. Aliquam semper ipsum sit amet velit.\n Suspendisse id sem consectetuer libero luctus adipiscing.\n\nBut if you want to be lazy, you don't have to:\n\n- Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\n Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,\n viverra nec, fringilla in, laoreet vitae, risus.\n- Donec sit amet nisl. Aliquam semper ipsum sit amet velit.\n Suspendisse id sem consectetuer libero luctus adipiscing.\n\nList items may consist of multiple paragraphs. Each subsequent\nparagraph in a list item must be indented by either 4 spaces\nor one tab:\n\n1. This is a list item with two paragraphs. Lorem ipsum dolor\n sit amet, consectetuer adipiscing elit. Aliquam hendrerit\n mi posuere lectus.\n\n Vestibulum enim wisi, viverra nec, fringilla in, laoreet\n vitae, risus. Donec sit amet nisl. Aliquam semper ipsum\n sit amet velit.\n\n2. Suspendisse id sem consectetuer libero luctus adipiscing.\n\nIt looks nice if you indent every line of the subsequent\nparagraphs, but here again, Markdown will allow you to be\nlazy:\n\n- This is a list item with two paragraphs.\n\n This is the second paragraph in the list item. You're\n\n only required to indent the first line. Lorem ipsum dolor\n sit amet, consectetuer adipiscing elit.\n\n- Another item in the same list.\n\ndelimiters need to be indented:\n\n- A list item with a blockquote:\n\n > This is a blockquote\n > inside a list item.\n\nTo put a code block within a list item, the code block needs\nto be indented _twice_ -- 8 spaces or two tabs:\n\n- A list item with a code block:\n\n### Code Blocks\n\nPre-formatted code blocks are used for writing about programming or\nmarkup source code. Rather than forming normal paragraphs, the lines\nof a code block are interpreted literally. Markdown wraps a code block\n\nTo produce a code block in Markdown, simply indent every line of the\nblock by at least 4 spaces or 1 tab.\n\nThis is a normal paragraph:\n\n This is a code block.\n\nHere is an example of AppleScript:\n\n tell application \"Foo\"\n beep\n end tell\n\nA code block continues until it reaches a line that is not indented\n(or the end of the article).\n\nare automatically converted into HTML entities. This makes it very\neasy to include example HTML source code using Markdown -- just paste\nit and indent it, and Markdown will handle the hassle of encoding the\nampersands and angle brackets. For example, this:\n\nRegular Markdown syntax is not processed within code blocks. E.g.,\nasterisks are just literal asterisks within a code block. This means\nit's also easy to use Markdown to write about Markdown's own syntax.\n\n## Span Elements\n\n### Links\n\nMarkdown supports two style of links: _inline_ and _reference_.\n\nIn both styles, the link text is delimited by [square brackets].\n\nTo create an inline link, use a set of regular parentheses immediately\nafter the link text's closing square bracket. Inside the parentheses,\nput the URL where you want the link to point, along with an _optional_\ntitle for the link, surrounded in quotes. For example:\n\nThis is [an example](http://example.com/) inline link.\n\n[This link](http://example.net/) has no title attribute.\n\n### Emphasis\n\n_single asterisks_\n\n_single underscores_\n\n**double asterisks**\n\n**double underscores**\n\n### Code\n\nUnlike a pre-formatted code block, a code span indicates code within a\nnormal paragraph. For example:\n", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 3051, - "labelHeight": 4853, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 1481, + "x": 12, "y": 12 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 1481, - "y": 5191 + "x": 12, + "y": 362 }, "width": 113, "height": 126, @@ -149,11 +149,11 @@ "labelPercentage": 0, "route": [ { - "x": 1537.5, + "x": 68.5, "y": 138 }, { - "x": 1537.5, + "x": 68.5, "y": 238 } ], @@ -188,12 +188,12 @@ "labelPercentage": 0, "route": [ { - "x": 1537.5, - "y": 5091 + "x": 68.5, + "y": 262 }, { - "x": 1537.5, - "y": 5191 + "x": 68.5, + "y": 362 } ], "animated": false, diff --git a/e2etests/testdata/stable/giant_markdown_test/elk/sketch.exp.svg b/e2etests/testdata/stable/giant_markdown_test/elk/sketch.exp.svg index e68c3416d..6e3415cfc 100644 --- a/e2etests/testdata/stable/giant_markdown_test/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/giant_markdown_test/elk/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="3255" height="5509" viewBox="-90 -90 3255 5509">

Markdown: Syntax

- -

Note: This document is itself written using Markdown; you -can see the source for it by adding '.text' to the URL.

-
-

Overview

-

Philosophy

-

Markdown is intended to be as easy-to-read and easy-to-write as is feasible.

-

Readability, however, is emphasized above all else. A Markdown-formatted -document should be publishable as-is, as plain text, without looking -like it's been marked up with tags or formatting instructions. While -Markdown's syntax has been influenced by several existing text-to-HTML -filters -- including Setext, atx, Textile, reStructuredText, -Grutatext, and EtText -- the single biggest source of -inspiration for Markdown's syntax is the format of plain text email.

-

Block Elements

-

Paragraphs and Line Breaks

-

A paragraph is simply one or more consecutive lines of text, separated -by one or more blank lines. (A blank line is any line that looks like a -blank line -- a line containing nothing but spaces or tabs is considered -blank.) Normal paragraphs should not be indented with spaces or tabs.

-

The implication of the "one or more consecutive lines of text" rule is -that Markdown supports "hard-wrapped" text paragraphs. This differs -significantly from most other text-to-HTML formatters (including Movable -Type's "Convert Line Breaks" option) which translate every line break -end a line with two or more spaces, then type return.

-

Headers

-

Markdown supports two styles of headers, [Setext] [1] and [atx] [2].

-

Optionally, you may "close" atx-style headers. This is purely -cosmetic -- you can use this if you think it looks better. The -closing hashes don't even need to match the number of hashes -used to open the header. (The number of opening hashes -determines the header level.)

-

Blockquotes

-

familiar with quoting passages of text in an email message, then you -know how to create a blockquote in Markdown. It looks best if you hard

-
-

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, -consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. -Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

-

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse -id sem consectetuer libero luctus adipiscing.

-
-

line of a hard-wrapped paragraph:

-
-

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, -consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. -Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

-
-
-

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse -id sem consectetuer libero luctus adipiscing.

-
-

Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by

-
-

This is the first level of quoting.

-
-

This is nested blockquote.

-
-

Back to the first level.

-
-

Blockquotes can contain other Markdown elements, including headers, lists, -and code blocks:

-
-

This is a header.

-
    -
  1. This is the first list item.
  2. -
  3. This is the second list item.
  4. -
-

Here's some example code:

-
return shell_exec("echo $input  $markdown_script");
-
-
-

Any decent text editor should make email-style quoting easy. For -example, with BBEdit, you can make a selection and choose Increase -Quote Level from the Text menu.

-

Lists

-

Markdown supports ordered (numbered) and unordered (bulleted) lists.

-

Unordered lists use asterisks, pluses, and hyphens -- interchangably --- as list markers:

-
    -
  • Red
  • -
  • Green
  • -
  • Blue
  • -
-

is equivalent to:

-
    -
  • Red
  • -
  • Green
  • -
  • Blue
  • -
-

and:

-
    -
  • Red
  • -
  • Green
  • -
  • Blue
  • -
-

Ordered lists use numbers followed by periods:

-
    -
  1. Bird
  2. -
  3. McHale
  4. -
  5. Parish
  6. -
-

It's important to note that the actual numbers you use to mark the -list have no effect on the HTML output Markdown produces. The HTML -Markdown produces from the above list is:

-

If you instead wrote the list in Markdown like this:

-
    -
  1. Bird
  2. -
  3. McHale
  4. -
  5. Parish
  6. -
-

or even:

-
    -
  1. Bird
  2. -
  3. McHale
  4. -
  5. Parish
  6. -
-

you'd get the exact same HTML output. The point is, if you want to, -you can use ordinal numbers in your ordered Markdown lists, so that -the numbers in your source match the numbers in your published HTML. -But if you want to be lazy, you don't have to.

-

To make lists look nice, you can wrap items with hanging indents:

-
    -
  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. -Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, -viverra nec, fringilla in, laoreet vitae, risus.
  • -
  • Donec sit amet nisl. Aliquam semper ipsum sit amet velit. -Suspendisse id sem consectetuer libero luctus adipiscing.
  • -
-

But if you want to be lazy, you don't have to:

-
    -
  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit. -Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, -viverra nec, fringilla in, laoreet vitae, risus.
  • -
  • Donec sit amet nisl. Aliquam semper ipsum sit amet velit. -Suspendisse id sem consectetuer libero luctus adipiscing.
  • -
-

List items may consist of multiple paragraphs. Each subsequent -paragraph in a list item must be indented by either 4 spaces -or one tab:

-
    -
  1. -

    This is a list item with two paragraphs. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit. Aliquam hendrerit -mi posuere lectus.

    -

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet -vitae, risus. Donec sit amet nisl. Aliquam semper ipsum -sit amet velit.

    -
  2. -
  3. -

    Suspendisse id sem consectetuer libero luctus adipiscing.

    -
  4. -
-

It looks nice if you indent every line of the subsequent -paragraphs, but here again, Markdown will allow you to be -lazy:

-
    -
  • -

    This is a list item with two paragraphs.

    -
    This is the second paragraph in the list item. You're
    -
    -

    only required to indent the first line. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit.

    -
  • -
  • -

    Another item in the same list.

    -
  • -
-

delimiters need to be indented:

-
    -
  • -

    A list item with a blockquote:

    -
    -

    This is a blockquote -inside a list item.

    -
    -
  • -
-

To put a code block within a list item, the code block needs -to be indented twice -- 8 spaces or two tabs:

-
    -
  • A list item with a code block:
  • -
-

Code Blocks

-

Pre-formatted code blocks are used for writing about programming or -markup source code. Rather than forming normal paragraphs, the lines -of a code block are interpreted literally. Markdown wraps a code block

-

To produce a code block in Markdown, simply indent every line of the -block by at least 4 spaces or 1 tab.

-

This is a normal paragraph:

-
This is a code block.
-
-

Here is an example of AppleScript:

-
tell application "Foo"
-    beep
-end tell
-
-

A code block continues until it reaches a line that is not indented -(or the end of the article).

-

are automatically converted into HTML entities. This makes it very -easy to include example HTML source code using Markdown -- just paste -it and indent it, and Markdown will handle the hassle of encoding the -ampersands and angle brackets. For example, this:

-

Regular Markdown syntax is not processed within code blocks. E.g., -asterisks are just literal asterisks within a code block. This means -it's also easy to use Markdown to write about Markdown's own syntax.

-

Span Elements

-

Links

-

Markdown supports two style of links: inline and reference.

-

In both styles, the link text is delimited by [square brackets].

-

To create an inline link, use a set of regular parentheses immediately -after the link text's closing square bracket. Inside the parentheses, -put the URL where you want the link to point, along with an optional -title for the link, surrounded in quotes. For example:

-

This is an example inline link.

-

This link has no title attribute.

-

Emphasis

-

single asterisks

-

single underscores

-

double asterisks

-

double underscores

-

Code

-

Unlike a pre-formatted code block, a code span indicates code within a -normal paragraph. For example:

-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/hr/dagre/board.exp.json b/e2etests/testdata/stable/hr/dagre/board.exp.json index 53d038cc7..bdae01f3e 100644 --- a/e2etests/testdata/stable/hr/dagre/board.exp.json +++ b/e2etests/testdata/stable/hr/dagre/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 0, + "x": 45, "y": 226 }, - "width": 738, - "height": 135, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "\n**Note:** This document is itself written using Markdown; you\ncan [see the source for it by adding '.text' to the URL](/projects/markdown/syntax.text).\n\n---\n\n## Overview\n", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 738, - "labelHeight": 135, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 313, + "x": 0, "y": 0 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 313, - "y": 461 + "x": 0, + "y": 350 }, "width": 113, "height": 126, @@ -149,19 +149,19 @@ "labelPercentage": 0, "route": [ { - "x": 369, + "x": 56.5, "y": 126 }, { - "x": 369, + "x": 56.5, "y": 166 }, { - "x": 369, + "x": 56.5, "y": 186 }, { - "x": 369, + "x": 56.5, "y": 226 } ], @@ -197,20 +197,20 @@ "labelPercentage": 0, "route": [ { - "x": 369, - "y": 361 + "x": 56.5, + "y": 250 }, { - "x": 369, - "y": 401 + "x": 56.5, + "y": 290 }, { - "x": 369, - "y": 421 + "x": 56.5, + "y": 310 }, { - "x": 369, - "y": 461 + "x": 56.5, + "y": 350 } ], "isCurve": true, diff --git a/e2etests/testdata/stable/hr/dagre/sketch.exp.svg b/e2etests/testdata/stable/hr/dagre/sketch.exp.svg index 7f81e905b..823f11cf2 100644 --- a/e2etests/testdata/stable/hr/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/hr/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="942" height="791" viewBox="-102 -102 942 791">

Note: This document is itself written using Markdown; you -can see the source for it by adding '.text' to the URL.

-
-

Overview

-
ab - +

md

+
ab +

Note: This document is itself written using Markdown; you -can see the source for it by adding '.text' to the URL.

-
-

Overview

-
ab - +

md

+
ab + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + + mixed togethersugarsolution we get - - +mixed togethersugarsolution we get + + ab - +

md

+
ab + ab - +

md

+
ab +
-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/li2/elk/board.exp.json b/e2etests/testdata/stable/li2/elk/board.exp.json index dad2f653d..80332ab06 100644 --- a/e2etests/testdata/stable/li2/elk/board.exp.json +++ b/e2etests/testdata/stable/li2/elk/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 12, + "x": 57, "y": 238 }, - "width": 245, - "height": 76, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "\n- [Overview](#overview) ok _this is all measured_\n\t- [Philosophy](#philosophy)\n\t- [Inline HTML](#html)\n", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 245, - "labelHeight": 76, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 78, + "x": 12, "y": 12 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 78, - "y": 414 + "x": 12, + "y": 362 }, "width": 113, "height": 126, @@ -149,11 +149,11 @@ "labelPercentage": 0, "route": [ { - "x": 134.5, + "x": 68.5, "y": 138 }, { - "x": 134.5, + "x": 68.5, "y": 238 } ], @@ -188,12 +188,12 @@ "labelPercentage": 0, "route": [ { - "x": 134.5, - "y": 314 + "x": 68.5, + "y": 262 }, { - "x": 134.5, - "y": 414 + "x": 68.5, + "y": 362 } ], "animated": false, diff --git a/e2etests/testdata/stable/li2/elk/sketch.exp.svg b/e2etests/testdata/stable/li2/elk/sketch.exp.svg index 6b418d9ac..6e3415cfc 100644 --- a/e2etests/testdata/stable/li2/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/li2/elk/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="449" height="732" viewBox="-90 -90 449 732">
-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/li3/dagre/board.exp.json b/e2etests/testdata/stable/li3/dagre/board.exp.json index b405619c1..bdae01f3e 100644 --- a/e2etests/testdata/stable/li3/dagre/board.exp.json +++ b/e2etests/testdata/stable/li3/dagre/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 0, + "x": 45, "y": 226 }, - "width": 347, - "height": 512, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "\n- [Overview](#overview)\n - [Philosophy](#philosophy)\n - [Inline HTML](#html)\n - [Automatic Escaping for Special Characters](#autoescape)\n- [Block Elements](#block)\n - [Paragraphs and Line Breaks](#p)\n - [Headers](#header)\n - [Blockquotes](#blockquote)\n - [Lists](#list)\n - [Code Blocks](#precode)\n - [Horizontal Rules](#hr)\n- [Span Elements](#span)\n - [Links](#link)\n - [Emphasis](#em)\n - [Code](#code)\n - [Images](#img)\n- [Miscellaneous](#misc)\n - [Backslash Escapes](#backslash)\n - [Automatic Links](#autolink)\n", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 347, - "labelHeight": 512, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 117, + "x": 0, "y": 0 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 117, - "y": 838 + "x": 0, + "y": 350 }, "width": 113, "height": 126, @@ -149,19 +149,19 @@ "labelPercentage": 0, "route": [ { - "x": 173.5, + "x": 56.5, "y": 126 }, { - "x": 173.5, + "x": 56.5, "y": 166 }, { - "x": 173.5, + "x": 56.5, "y": 186 }, { - "x": 173.5, + "x": 56.5, "y": 226 } ], @@ -197,20 +197,20 @@ "labelPercentage": 0, "route": [ { - "x": 173.5, - "y": 738 + "x": 56.5, + "y": 250 }, { - "x": 173.5, - "y": 778 + "x": 56.5, + "y": 290 }, { - "x": 173.5, - "y": 798 + "x": 56.5, + "y": 310 }, { - "x": 173.5, - "y": 838 + "x": 56.5, + "y": 350 } ], "isCurve": true, diff --git a/e2etests/testdata/stable/li3/dagre/sketch.exp.svg b/e2etests/testdata/stable/li3/dagre/sketch.exp.svg index eb5b87298..823f11cf2 100644 --- a/e2etests/testdata/stable/li3/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/li3/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="551" height="1168" viewBox="-102 -102 551 1168">ab - +

md

+
ab + ab - +

md

+
ab +

List items may consist of multiple paragraphs. Each subsequent -paragraph in a list item must be indented by either 4 spaces -or one tab:

-
    -
  1. -

    This is a list item with two paragraphs. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit. Aliquam hendrerit -mi posuere lectus.

    -

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet -vitae, risus. Donec sit amet nisl. Aliquam semper ipsum -sit amet velit.

    -
  2. -
  3. -

    Suspendisse id sem consectetuer libero luctus adipiscing.

    -
  4. -
-

It looks nice if you indent every line of the subsequent -paragraphs, but here again, Markdown will allow you to be -lazy:

-
    -
  • -

    This is a list item with two paragraphs.

    -
    This is the second paragraph in the list item. You're
    -
    -

    only required to indent the first line. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit.

    -
  • -
  • -

    Another item in the same list.

    -
  • -
-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/li4/elk/board.exp.json b/e2etests/testdata/stable/li4/elk/board.exp.json index 93e3ba639..80332ab06 100644 --- a/e2etests/testdata/stable/li4/elk/board.exp.json +++ b/e2etests/testdata/stable/li4/elk/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 12, + "x": 57, "y": 238 }, - "width": 920, - "height": 376, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "\nList items may consist of multiple paragraphs. Each subsequent\nparagraph in a list item must be indented by either 4 spaces\nor one tab:\n\n1. This is a list item with two paragraphs. Lorem ipsum dolor\n sit amet, consectetuer adipiscing elit. Aliquam hendrerit\n mi posuere lectus.\n\n Vestibulum enim wisi, viverra nec, fringilla in, laoreet\n vitae, risus. Donec sit amet nisl. Aliquam semper ipsum\n sit amet velit.\n\n2. Suspendisse id sem consectetuer libero luctus adipiscing.\n\nIt looks nice if you indent every line of the subsequent\nparagraphs, but here again, Markdown will allow you to be\nlazy:\n\n- This is a list item with two paragraphs.\n\n This is the second paragraph in the list item. You're\n\n only required to indent the first line. Lorem ipsum dolor\n sit amet, consectetuer adipiscing elit.\n\n- Another item in the same list.\n", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 920, - "labelHeight": 376, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 415, + "x": 12, "y": 12 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 415, - "y": 714 + "x": 12, + "y": 362 }, "width": 113, "height": 126, @@ -149,11 +149,11 @@ "labelPercentage": 0, "route": [ { - "x": 472, + "x": 68.5, "y": 138 }, { - "x": 472, + "x": 68.5, "y": 238 } ], @@ -188,12 +188,12 @@ "labelPercentage": 0, "route": [ { - "x": 472, - "y": 614 + "x": 68.5, + "y": 262 }, { - "x": 472, - "y": 714 + "x": 68.5, + "y": 362 } ], "animated": false, diff --git a/e2etests/testdata/stable/li4/elk/sketch.exp.svg b/e2etests/testdata/stable/li4/elk/sketch.exp.svg index 1168eb8b2..6e3415cfc 100644 --- a/e2etests/testdata/stable/li4/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/li4/elk/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="1124" height="1032" viewBox="-90 -90 1124 1032">

List items may consist of multiple paragraphs. Each subsequent -paragraph in a list item must be indented by either 4 spaces -or one tab:

-
    -
  1. -

    This is a list item with two paragraphs. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit. Aliquam hendrerit -mi posuere lectus.

    -

    Vestibulum enim wisi, viverra nec, fringilla in, laoreet -vitae, risus. Donec sit amet nisl. Aliquam semper ipsum -sit amet velit.

    -
  2. -
  3. -

    Suspendisse id sem consectetuer libero luctus adipiscing.

    -
  4. -
-

It looks nice if you indent every line of the subsequent -paragraphs, but here again, Markdown will allow you to be -lazy:

-
    -
  • -

    This is a list item with two paragraphs.

    -
    This is the second paragraph in the list item. You're
    -
    -

    only required to indent the first line. Lorem ipsum dolor -sit amet, consectetuer adipiscing elit.

    -
  • -
  • -

    Another item in the same list.

    -
  • -
-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/links/dagre/board.exp.json b/e2etests/testdata/stable/links/dagre/board.exp.json index ad73036b4..81d877183 100644 --- a/e2etests/testdata/stable/links/dagre/board.exp.json +++ b/e2etests/testdata/stable/links/dagre/board.exp.json @@ -4,7 +4,7 @@ "shapes": [ { "id": "x", - "type": "", + "type": "rectangle", "pos": { "x": 1, "y": 0 @@ -44,7 +44,7 @@ }, { "id": "y", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 226 diff --git a/e2etests/testdata/stable/links/dagre/sketch.exp.svg b/e2etests/testdata/stable/links/dagre/sketch.exp.svg index 01b4bf38b..d948b5fa0 100644 --- a/e2etests/testdata/stable/links/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/links/dagre/sketch.exp.svg @@ -77,7 +77,7 @@ knowing I can't make my satellite dish PAYMENTS! +

Markdown: Syntax

-
ab - +

md

+
ab +

Markdown: Syntax

-
ab - +

md

+
ab +

Every frustum longs to be a cone

-
    -
  • A continuing flow of paper is sufficient to continue the flow of paper
  • -
  • Please remain calm, it's no use both of us being hysterical at the same time
  • -
  • Visits always give pleasure: if not on arrival, then on the departure
  • -
-

Festivity Level 1: Your guests are chatting amiably with each other.

-
xy - +

hey

+
xy + \ No newline at end of file diff --git a/e2etests/testdata/stable/markdown/elk/board.exp.json b/e2etests/testdata/stable/markdown/elk/board.exp.json index c6464454f..4208359a7 100644 --- a/e2etests/testdata/stable/markdown/elk/board.exp.json +++ b/e2etests/testdata/stable/markdown/elk/board.exp.json @@ -6,11 +6,11 @@ "id": "hey", "type": "text", "pos": { - "x": 12, + "x": 56, "y": 238 }, - "width": 531, - "height": 187, + "width": 25, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "# Every frustum longs to be a cone\n\n- A continuing flow of paper is sufficient to continue the flow of paper\n- Please remain calm, it's no use both of us being hysterical at the same time\n- Visits always give pleasure: if not on arrival, then on the departure\n\n*Festivity Level 1*: Your guests are chatting amiably with each other.", + "label": "hey", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 531, - "labelHeight": 187, + "labelWidth": 25, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "x", - "type": "", + "type": "rectangle", "pos": { - "x": 221, + "x": 12, "y": 12 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "y", - "type": "", + "type": "rectangle", "pos": { - "x": 220, - "y": 525 + "x": 12, + "y": 362 }, "width": 114, "height": 126, @@ -149,11 +149,11 @@ "labelPercentage": 0, "route": [ { - "x": 277.5, + "x": 69, "y": 138 }, { - "x": 277.5, + "x": 69, "y": 238 } ], @@ -188,12 +188,12 @@ "labelPercentage": 0, "route": [ { - "x": 277.5, - "y": 425 + "x": 69, + "y": 262 }, { - "x": 277.5, - "y": 525 + "x": 69, + "y": 362 } ], "animated": false, diff --git a/e2etests/testdata/stable/markdown/elk/sketch.exp.svg b/e2etests/testdata/stable/markdown/elk/sketch.exp.svg index 9f87d63de..5db1cda00 100644 --- a/e2etests/testdata/stable/markdown/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/markdown/elk/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="735" height="843" viewBox="-90 -90 735 843">

Every frustum longs to be a cone

-
    -
  • A continuing flow of paper is sufficient to continue the flow of paper
  • -
  • Please remain calm, it's no use both of us being hysterical at the same time
  • -
  • Visits always give pleasure: if not on arrival, then on the departure
  • -
-

Festivity Level 1: Your guests are chatting amiably with each other.

-
xy - +

hey

+
xy + \ No newline at end of file diff --git a/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json b/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json index 8ac374d25..ef95474c4 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json +++ b/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json @@ -4,13 +4,13 @@ "shapes": [ { "id": "container", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 0 }, - "width": 312, - "height": 358, + "width": 141, + "height": 124, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -46,11 +46,11 @@ "id": "container.md", "type": "text", "pos": { - "x": 50, + "x": 69, "y": 50 }, - "width": 212, - "height": 258, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -68,7 +68,7 @@ "fields": null, "methods": null, "columns": null, - "label": "# a header\n\na line of text and an\n\n\t{\n\t\tindented: \"block\",\n\t\tof: \"json\",\n\t}\n\nwalk into a bar.", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -76,8 +76,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 212, - "labelHeight": 258, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 2 }, @@ -85,10 +85,10 @@ "id": "no container", "type": "text", "pos": { - "x": 97, - "y": 458 + "x": 37, + "y": 224 }, - "width": 118, + "width": 86, "height": 24, "opacity": 1, "strokeDash": 0, @@ -107,7 +107,7 @@ "fields": null, "methods": null, "columns": null, - "label": "they did it in style", + "label": "no container", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -115,7 +115,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 118, + "labelWidth": 86, "labelHeight": 24, "zIndex": 0, "level": 1 @@ -148,20 +148,20 @@ "labelPercentage": 0, "route": [ { - "x": 156, - "y": 358 + "x": 80, + "y": 124 }, { - "x": 156, - "y": 398 + "x": 80, + "y": 164 }, { - "x": 156, - "y": 418 + "x": 80, + "y": 184 }, { - "x": 156, - "y": 458 + "x": 80, + "y": 224 } ], "isCurve": true, diff --git a/e2etests/testdata/stable/markdown_stroke_fill/dagre/sketch.exp.svg b/e2etests/testdata/stable/markdown_stroke_fill/dagre/sketch.exp.svg index 9a9692643..f1225e1c5 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/markdown_stroke_fill/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="516" height="686" viewBox="-102 -102 516 686">container

they did it in style

-

a header

-

a line of text and an

-
{
-	indented: "block",
-	of: "json",
-}
-
-

walk into a bar.

-
- +container

no container

+

md

+
+ \ No newline at end of file diff --git a/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json b/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json index 8522f9433..813f43923 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json +++ b/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json @@ -4,13 +4,13 @@ "shapes": [ { "id": "container", - "type": "", + "type": "rectangle", "pos": { "x": 12, "y": 12 }, - "width": 362, - "height": 408, + "width": 173, + "height": 174, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -49,8 +49,8 @@ "x": 87, "y": 87 }, - "width": 212, - "height": 258, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -68,7 +68,7 @@ "fields": null, "methods": null, "columns": null, - "label": "# a header\n\na line of text and an\n\n\t{\n\t\tindented: \"block\",\n\t\tof: \"json\",\n\t}\n\nwalk into a bar.", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -76,8 +76,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 212, - "labelHeight": 258, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 2 }, @@ -85,10 +85,10 @@ "id": "no container", "type": "text", "pos": { - "x": 134, - "y": 520 + "x": 55, + "y": 286 }, - "width": 118, + "width": 86, "height": 24, "opacity": 1, "strokeDash": 0, @@ -107,7 +107,7 @@ "fields": null, "methods": null, "columns": null, - "label": "they did it in style", + "label": "no container", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -115,7 +115,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 118, + "labelWidth": 86, "labelHeight": 24, "zIndex": 0, "level": 1 @@ -148,12 +148,12 @@ "labelPercentage": 0, "route": [ { - "x": 193, - "y": 420 + "x": 98.5, + "y": 186 }, { - "x": 193, - "y": 520 + "x": 98.5, + "y": 286 } ], "animated": false, diff --git a/e2etests/testdata/stable/markdown_stroke_fill/elk/sketch.exp.svg b/e2etests/testdata/stable/markdown_stroke_fill/elk/sketch.exp.svg index c67be9203..d129518c1 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/markdown_stroke_fill/elk/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="566" height="736" viewBox="-90 -90 566 736">container

they did it in style

-

a header

-

a line of text and an

-
{
-	indented: "block",
-	of: "json",
-}
-
-

walk into a bar.

-
- +container

no container

+

md

+
+ \ No newline at end of file diff --git a/e2etests/testdata/stable/md_2space_newline/dagre/board.exp.json b/e2etests/testdata/stable/md_2space_newline/dagre/board.exp.json index 5376f8370..539f204b8 100644 --- a/e2etests/testdata/stable/md_2space_newline/dagre/board.exp.json +++ b/e2etests/testdata/stable/md_2space_newline/dagre/board.exp.json @@ -4,13 +4,13 @@ "shapes": [ { "id": "markdown", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 0 }, - "width": 559, - "height": 148, + "width": 123, + "height": 124, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -49,8 +49,8 @@ "x": 50, "y": 50 }, - "width": 459, - "height": 48, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -68,7 +68,7 @@ "fields": null, "methods": null, "columns": null, - "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \nsed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -76,8 +76,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 459, - "labelHeight": 48, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 2 } diff --git a/e2etests/testdata/stable/md_2space_newline/dagre/sketch.exp.svg b/e2etests/testdata/stable/md_2space_newline/dagre/sketch.exp.svg index 2a8197e7d..76cdf8fc5 100644 --- a/e2etests/testdata/stable/md_2space_newline/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/md_2space_newline/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="763" height="352" viewBox="-102 -102 763 352">markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
-sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

-
- +markdown

md

+
+ markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
-sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

-
- +markdown

md

+
+ markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
-sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

-
- +markdown

md

+
+ markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
-sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

-
- +markdown

md

+
+
{
-	fenced: "block",
-	of: "json",
-}
-
-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/md_code_block_fenced/elk/board.exp.json b/e2etests/testdata/stable/md_code_block_fenced/elk/board.exp.json index 51ff40814..80332ab06 100644 --- a/e2etests/testdata/stable/md_code_block_fenced/elk/board.exp.json +++ b/e2etests/testdata/stable/md_code_block_fenced/elk/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 12, + "x": 57, "y": 238 }, - "width": 196, - "height": 111, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "```\n{\n\tfenced: \"block\",\n\tof: \"json\",\n}\n```", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 196, - "labelHeight": 111, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 53, + "x": 12, "y": 12 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 53, - "y": 449 + "x": 12, + "y": 362 }, "width": 113, "height": 126, @@ -149,11 +149,11 @@ "labelPercentage": 0, "route": [ { - "x": 110, + "x": 68.5, "y": 138 }, { - "x": 110, + "x": 68.5, "y": 238 } ], @@ -188,12 +188,12 @@ "labelPercentage": 0, "route": [ { - "x": 110, - "y": 349 + "x": 68.5, + "y": 262 }, { - "x": 110, - "y": 449 + "x": 68.5, + "y": 362 } ], "animated": false, diff --git a/e2etests/testdata/stable/md_code_block_fenced/elk/sketch.exp.svg b/e2etests/testdata/stable/md_code_block_fenced/elk/sketch.exp.svg index d2dfa9208..6e3415cfc 100644 --- a/e2etests/testdata/stable/md_code_block_fenced/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/md_code_block_fenced/elk/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="400" height="767" viewBox="-90 -90 400 767">
{
-	fenced: "block",
-	of: "json",
-}
-
-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/md_code_block_indented/dagre/board.exp.json b/e2etests/testdata/stable/md_code_block_indented/dagre/board.exp.json index 6f3d1a97c..bdae01f3e 100644 --- a/e2etests/testdata/stable/md_code_block_indented/dagre/board.exp.json +++ b/e2etests/testdata/stable/md_code_block_indented/dagre/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 0, + "x": 45, "y": 226 }, - "width": 212, - "height": 151, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "a line of text and an\n\n\t{\n\t\tindented: \"block\",\n\t\tof: \"json\",\n\t}\n", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 212, - "labelHeight": 151, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 50, + "x": 0, "y": 0 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 50, - "y": 477 + "x": 0, + "y": 350 }, "width": 113, "height": 126, @@ -149,19 +149,19 @@ "labelPercentage": 0, "route": [ { - "x": 106, + "x": 56.5, "y": 126 }, { - "x": 106, + "x": 56.5, "y": 166 }, { - "x": 106, + "x": 56.5, "y": 186 }, { - "x": 106, + "x": 56.5, "y": 226 } ], @@ -197,20 +197,20 @@ "labelPercentage": 0, "route": [ { - "x": 106, - "y": 377 + "x": 56.5, + "y": 250 }, { - "x": 106, - "y": 417 + "x": 56.5, + "y": 290 }, { - "x": 106, - "y": 437 + "x": 56.5, + "y": 310 }, { - "x": 106, - "y": 477 + "x": 56.5, + "y": 350 } ], "isCurve": true, diff --git a/e2etests/testdata/stable/md_code_block_indented/dagre/sketch.exp.svg b/e2etests/testdata/stable/md_code_block_indented/dagre/sketch.exp.svg index 77c605302..823f11cf2 100644 --- a/e2etests/testdata/stable/md_code_block_indented/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/md_code_block_indented/dagre/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="416" height="807" viewBox="-102 -102 416 807">

a line of text and an

-
{
-	indented: "block",
-	of: "json",
-}
-
-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/md_code_block_indented/elk/board.exp.json b/e2etests/testdata/stable/md_code_block_indented/elk/board.exp.json index 353e5a4d6..80332ab06 100644 --- a/e2etests/testdata/stable/md_code_block_indented/elk/board.exp.json +++ b/e2etests/testdata/stable/md_code_block_indented/elk/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 12, + "x": 57, "y": 238 }, - "width": 212, - "height": 151, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "a line of text and an\n\n\t{\n\t\tindented: \"block\",\n\t\tof: \"json\",\n\t}\n", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 212, - "labelHeight": 151, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 61, + "x": 12, "y": 12 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 61, - "y": 489 + "x": 12, + "y": 362 }, "width": 113, "height": 126, @@ -149,11 +149,11 @@ "labelPercentage": 0, "route": [ { - "x": 118, + "x": 68.5, "y": 138 }, { - "x": 118, + "x": 68.5, "y": 238 } ], @@ -188,12 +188,12 @@ "labelPercentage": 0, "route": [ { - "x": 118, - "y": 389 + "x": 68.5, + "y": 262 }, { - "x": 118, - "y": 489 + "x": 68.5, + "y": 362 } ], "animated": false, diff --git a/e2etests/testdata/stable/md_code_block_indented/elk/sketch.exp.svg b/e2etests/testdata/stable/md_code_block_indented/elk/sketch.exp.svg index 0128d015c..6e3415cfc 100644 --- a/e2etests/testdata/stable/md_code_block_indented/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/md_code_block_indented/elk/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="416" height="807" viewBox="-90 -90 416 807">

a line of text and an

-
{
-	indented: "block",
-	of: "json",
-}
-
-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/md_code_inline/dagre/board.exp.json b/e2etests/testdata/stable/md_code_inline/dagre/board.exp.json index afb3938c0..bdae01f3e 100644 --- a/e2etests/testdata/stable/md_code_inline/dagre/board.exp.json +++ b/e2etests/testdata/stable/md_code_inline/dagre/board.exp.json @@ -6,10 +6,10 @@ "id": "md", "type": "text", "pos": { - "x": 34, + "x": 45, "y": 226 }, - "width": 46, + "width": 23, "height": 24, "opacity": 1, "strokeDash": 0, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "`code`", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,14 +36,14 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 46, + "labelWidth": 23, "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 0 @@ -83,7 +83,7 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 350 diff --git a/e2etests/testdata/stable/md_code_inline/dagre/sketch.exp.svg b/e2etests/testdata/stable/md_code_inline/dagre/sketch.exp.svg index faf0361bf..823f11cf2 100644 --- a/e2etests/testdata/stable/md_code_inline/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/md_code_inline/dagre/sketch.exp.svg @@ -796,8 +796,8 @@ width="317" height="680" viewBox="-102 -102 317 680">

code

-
ab +

md

+
ab \ No newline at end of file diff --git a/e2etests/testdata/stable/md_code_inline/elk/board.exp.json b/e2etests/testdata/stable/md_code_inline/elk/board.exp.json index e92f3beed..80332ab06 100644 --- a/e2etests/testdata/stable/md_code_inline/elk/board.exp.json +++ b/e2etests/testdata/stable/md_code_inline/elk/board.exp.json @@ -6,10 +6,10 @@ "id": "md", "type": "text", "pos": { - "x": 45, + "x": 57, "y": 238 }, - "width": 46, + "width": 23, "height": 24, "opacity": 1, "strokeDash": 0, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "`code`", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,14 +36,14 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 46, + "labelWidth": 23, "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { "x": 12, "y": 12 @@ -83,7 +83,7 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { "x": 12, "y": 362 diff --git a/e2etests/testdata/stable/md_code_inline/elk/sketch.exp.svg b/e2etests/testdata/stable/md_code_inline/elk/sketch.exp.svg index 87ae9e984..6e3415cfc 100644 --- a/e2etests/testdata/stable/md_code_inline/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/md_code_inline/elk/sketch.exp.svg @@ -796,8 +796,8 @@ width="317" height="680" viewBox="-90 -90 317 680">

code

-
ab +

md

+
ab \ No newline at end of file diff --git a/e2etests/testdata/stable/multiline_text/dagre/board.exp.json b/e2etests/testdata/stable/multiline_text/dagre/board.exp.json index c00ff06bf..381276777 100644 --- a/e2etests/testdata/stable/multiline_text/dagre/board.exp.json +++ b/e2etests/testdata/stable/multiline_text/dagre/board.exp.json @@ -4,7 +4,7 @@ "shapes": [ { "id": "hey", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 0 diff --git a/e2etests/testdata/stable/multiline_text/dagre/sketch.exp.svg b/e2etests/testdata/stable/multiline_text/dagre/sketch.exp.svg index ef5e0e5d8..280791570 100644 --- a/e2etests/testdata/stable/multiline_text/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/multiline_text/dagre/sketch.exp.svg @@ -39,7 +39,7 @@ width="406" height="362" viewBox="-102 -102 406 362">rootcontainerrootleftrightrootinnerrootinnerleftrightleftright to inner leftto inner rightto inner leftto inner rightto left container rootto right container root + + + + + + + +

A paragraph is simply one or more consecutive lines of text, separated -by one or more blank lines. (A blank line is any line that looks like a -blank line -- a line containing nothing but spaces or tabs is considered -blank.) Normal paragraphs should not be indented with spaces or tabs.

-
ab - +

md

+
ab +

A paragraph is simply one or more consecutive lines of text, separated -by one or more blank lines. (A blank line is any line that looks like a -blank line -- a line containing nothing but spaces or tabs is considered -blank.) Normal paragraphs should not be indented with spaces or tabs.

-
ab - +

md

+
ab +

Here is an example of AppleScript:

-
tell application "Foo"
-    beep
-end tell
-
-

A code block continues until it reaches a line that is not indented -(or the end of the article).

-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/pre/elk/board.exp.json b/e2etests/testdata/stable/pre/elk/board.exp.json index 42d05dd97..80332ab06 100644 --- a/e2etests/testdata/stable/pre/elk/board.exp.json +++ b/e2etests/testdata/stable/pre/elk/board.exp.json @@ -6,11 +6,11 @@ "id": "md", "type": "text", "pos": { - "x": 12, + "x": 57, "y": 238 }, - "width": 602, - "height": 170, + "width": 23, + "height": 24, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -28,7 +28,7 @@ "fields": null, "methods": null, "columns": null, - "label": "\nHere is an example of AppleScript:\n\n tell application \"Foo\"\n beep\n end tell\n\nA code block continues until it reaches a line that is not indented\n(or the end of the article).\n", + "label": "md", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -36,16 +36,16 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 602, - "labelHeight": 170, + "labelWidth": 23, + "labelHeight": 24, "zIndex": 0, "level": 1 }, { "id": "a", - "type": "", + "type": "rectangle", "pos": { - "x": 256, + "x": 12, "y": 12 }, "width": 113, @@ -83,10 +83,10 @@ }, { "id": "b", - "type": "", + "type": "rectangle", "pos": { - "x": 256, - "y": 508 + "x": 12, + "y": 362 }, "width": 113, "height": 126, @@ -149,11 +149,11 @@ "labelPercentage": 0, "route": [ { - "x": 313, + "x": 68.5, "y": 138 }, { - "x": 313, + "x": 68.5, "y": 238 } ], @@ -188,12 +188,12 @@ "labelPercentage": 0, "route": [ { - "x": 313, - "y": 408 + "x": 68.5, + "y": 262 }, { - "x": 313, - "y": 508 + "x": 68.5, + "y": 362 } ], "animated": false, diff --git a/e2etests/testdata/stable/pre/elk/sketch.exp.svg b/e2etests/testdata/stable/pre/elk/sketch.exp.svg index ede9ad5de..6e3415cfc 100644 --- a/e2etests/testdata/stable/pre/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/pre/elk/sketch.exp.svg @@ -3,7 +3,7 @@ id="d2-svg" style="background: white;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" -width="806" height="826" viewBox="-90 -90 806 826">

Here is an example of AppleScript:

-
tell application "Foo"
-    beep
-end tell
-
-

A code block continues until it reaches a line that is not indented -(or the end of the article).

-
ab - +

md

+
ab + \ No newline at end of file diff --git a/e2etests/testdata/stable/self-referencing/dagre/board.exp.json b/e2etests/testdata/stable/self-referencing/dagre/board.exp.json index 2b7fb17aa..2934816a9 100644 --- a/e2etests/testdata/stable/self-referencing/dagre/board.exp.json +++ b/e2etests/testdata/stable/self-referencing/dagre/board.exp.json @@ -4,7 +4,7 @@ "shapes": [ { "id": "x", - "type": "", + "type": "rectangle", "pos": { "x": 0, "y": 0 @@ -44,7 +44,7 @@ }, { "id": "y", - "type": "", + "type": "rectangle", "pos": { "x": 126, "y": 226 @@ -84,7 +84,7 @@ }, { "id": "z", - "type": "", + "type": "rectangle", "pos": { "x": 253, "y": 0 diff --git a/e2etests/testdata/stable/self-referencing/dagre/sketch.exp.svg b/e2etests/testdata/stable/self-referencing/dagre/sketch.exp.svg index 9fc29dbf0..bd7d2e548 100644 --- a/e2etests/testdata/stable/self-referencing/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/self-referencing/dagre/sketch.exp.svg @@ -39,7 +39,7 @@ width="647" height="556" viewBox="-102 -102 647 556">containerscloudtall cylinderclass- num int- timeout @@ -61,11 +808,18 @@ width="2482" height="2672" viewBox="-102 -102 2482 2672">containerscloudtall cylinderclass- num int- timeout @@ -61,11 +808,18 @@ width="2622" height="2644" viewBox="-90 -90 2622 2644">