diff --git a/d2ast/d2ast.go b/d2ast/d2ast.go index bd4373f766..85d6f8620d 100644 --- a/d2ast/d2ast.go +++ b/d2ast/d2ast.go @@ -151,6 +151,10 @@ func (r *Range) UnmarshalText(b []byte) (err error) { return r.End.UnmarshalText(end) } +func (r Range) Before(r2 Range) bool { + return r.Start.Before(r2.Start) +} + // Position represents a line:column and byte position in a file. // // note: Line and Column are zero indexed. @@ -259,6 +263,10 @@ func (p Position) SubtractString(s string, byUTF16 bool) Position { return p } +func (p Position) Before(p2 Position) bool { + return p.Byte < p2.Byte +} + // MapNode is implemented by nodes that may be children of Maps. type MapNode interface { Node diff --git a/d2compiler/compile.go b/d2compiler/compile.go index 4c6818ebba..53295c9131 100644 --- a/d2compiler/compile.go +++ b/d2compiler/compile.go @@ -42,7 +42,8 @@ func Compile(path string, r io.RuneReader, opts *CompileOptions) (*d2graph.Graph if err != nil { return nil, err } - return g, err + g = g.SortEdgesByAST() + return g, nil } func compileIR(ast *d2ast.Map, m *d2ir.Map) (*d2graph.Graph, error) { @@ -203,6 +204,7 @@ func (c *compiler) compileLabel(attrs *d2graph.Attributes, f d2ir.Node) { } else { attrs.Shape.Value = d2target.ShapeCode } + attrs.Label.Value = scalar.ScalarString() default: attrs.Label.Value = scalar.ScalarString() } diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 43098f61d4..d46cdeca8e 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -5,6 +5,7 @@ import ( "fmt" "math" "net/url" + "sort" "strconv" "strings" @@ -1436,3 +1437,18 @@ func (g *Graph) GetBoard(name string) *Graph { } return nil } + +func (g *Graph) SortEdgesByAST() *Graph { + edges := append([]*Edge(nil), g.Edges...) + sort.Slice(edges, func(i, j int) bool { + e1 := edges[i] + e2 := edges[j] + if len(e1.References) == 0 || len(e2.References) == 0 { + return i < j + } + return e1.References[0].Edge.Range.Before(edges[j].References[0].Edge.Range) + }) + g2 := *g + g2.Edges = edges + return &g2 +} diff --git a/d2layouts/d2sequence/layout.go b/d2layouts/d2sequence/layout.go index 14e4c6f804..8f2c6e9e33 100644 --- a/d2layouts/d2sequence/layout.go +++ b/d2layouts/d2sequence/layout.go @@ -5,11 +5,12 @@ import ( "sort" "strings" + "oss.terrastruct.com/util-go/go2" + "oss.terrastruct.com/d2/d2graph" "oss.terrastruct.com/d2/d2target" "oss.terrastruct.com/d2/lib/geo" "oss.terrastruct.com/d2/lib/label" - "oss.terrastruct.com/util-go/go2" ) func WithoutSequenceDiagrams(ctx context.Context, g *d2graph.Graph) (map[string]*sequenceDiagram, map[string]int, map[string]int, error) { @@ -113,6 +114,7 @@ func layoutSequenceDiagram(g *d2graph.Graph, obj *d2graph.Object) (*sequenceDiag func getLayoutEdges(g *d2graph.Graph, toRemove map[*d2graph.Edge]struct{}) ([]*d2graph.Edge, map[string]int) { edgeOrder := make(map[string]int) layoutEdges := make([]*d2graph.Edge, 0, len(g.Edges)-len(toRemove)) + for i, edge := range g.Edges { edgeOrder[edge.AbsID()] = i if _, exists := toRemove[edge]; !exists { diff --git a/d2lib/d2.go b/d2lib/d2.go index 413a5eba8e..fbd8222d54 100644 --- a/d2lib/d2.go +++ b/d2lib/d2.go @@ -86,7 +86,6 @@ func compile(ctx context.Context, g *d2graph.Graph, opts *CompileOptions) (*d2ta if err != nil { return nil, err } - ld.Type = "layer" d.Layers = append(d.Layers, ld) } for _, l := range g.Scenarios { @@ -94,7 +93,6 @@ func compile(ctx context.Context, g *d2graph.Graph, opts *CompileOptions) (*d2ta if err != nil { return nil, err } - ld.Type = "scenario" d.Scenarios = append(d.Scenarios, ld) } for _, l := range g.Steps { @@ -102,7 +100,6 @@ func compile(ctx context.Context, g *d2graph.Graph, opts *CompileOptions) (*d2ta if err != nil { return nil, err } - ld.Type = "step" d.Steps = append(d.Steps, ld) } return d, nil diff --git a/d2renderers/d2sketch/testdata/opacity/sketch.exp.svg b/d2renderers/d2sketch/testdata/opacity/sketch.exp.svg index 2d11255442..440a3daefb 100644 --- a/d2renderers/d2sketch/testdata/opacity/sketch.exp.svg +++ b/d2renderers/d2sketch/testdata/opacity/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="788" height="595" viewBox="-100 -102 788 595">1Like starbucks or something -2I'm not sure what this is +}]]>1Like starbucks or something +2I'm not sure what this is

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 - +

Oldest message

+

Offset

+

Last message

+

Next message will be
+inserted here

+
M0M1M2M3M4M5M6 +

md

-
ab - +

hey

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

md

-
ab - +

hey

+
    +
  • they +
      +
    1. they
    2. +
    +
  • +
+
ab + 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. - +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. + 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 - +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 + poll the peopleresultsunfavorablefavorablewill of the people

title

-
- +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

+
+

md

-
ab - +

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 + \ 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 378f076e06..20391bbd6d 100644 --- a/e2etests/testdata/stable/giant_markdown_test/elk/board.exp.json +++ b/e2etests/testdata/stable/giant_markdown_test/elk/board.exp.json @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 57, + "x": 12, "y": 238 }, - "width": 23, - "height": 24, + "width": 3051, + "height": 4853, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "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", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 3051, + "labelHeight": 4853, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 12, + "x": 1481, "y": 12 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 12, - "y": 362 + "x": 1481, + "y": 5191 }, "width": 113, "height": 126, @@ -153,11 +152,11 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, + "x": 1537.5, "y": 138 }, { - "x": 68.5, + "x": 1537.5, "y": 238 } ], @@ -192,12 +191,12 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, - "y": 262 + "x": 1537.5, + "y": 5091 }, { - "x": 68.5, - "y": 362 + "x": 1537.5, + "y": 5191 } ], "animated": false, @@ -205,8 +204,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } 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 4ef05dfe32..e0b0c127ad 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="317" height="680" viewBox="-90 -90 317 680">

md

-
ab - +

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 + \ 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 8afce2b2ec..60aa0984bd 100644 --- a/e2etests/testdata/stable/hr/dagre/board.exp.json +++ b/e2etests/testdata/stable/hr/dagre/board.exp.json @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 45, + "x": 0, "y": 226 }, - "width": 23, - "height": 24, + "width": 738, + "height": 135, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "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", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 738, + "labelHeight": 135, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 0, + "x": 313, "y": 0 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 0, - "y": 350 + "x": 313, + "y": 461 }, "width": 113, "height": 126, @@ -153,19 +152,19 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, + "x": 369, "y": 126 }, { - "x": 56.5, + "x": 369, "y": 166 }, { - "x": 56.5, + "x": 369, "y": 186 }, { - "x": 56.5, + "x": 369, "y": 226 } ], @@ -201,20 +200,20 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, - "y": 250 + "x": 369, + "y": 361 }, { - "x": 56.5, - "y": 290 + "x": 369, + "y": 401 }, { - "x": 56.5, - "y": 310 + "x": 369, + "y": 421 }, { - "x": 56.5, - "y": 350 + "x": 369, + "y": 461 } ], "isCurve": true, @@ -223,8 +222,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/hr/dagre/sketch.exp.svg b/e2etests/testdata/stable/hr/dagre/sketch.exp.svg index 45afbcef4f..03841322b3 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="317" height="680" viewBox="-102 -102 317 680">

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 - +

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

+
+

Overview

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

md

-
ab - +ab +

md

-
ab - +ab +

md

-
ab - +
+
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 378f076e06..4692b234cf 100644 --- a/e2etests/testdata/stable/li2/elk/board.exp.json +++ b/e2etests/testdata/stable/li2/elk/board.exp.json @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 57, + "x": 12, "y": 238 }, - "width": 23, - "height": 24, + "width": 245, + "height": 76, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "\n- [Overview](#overview) ok _this is all measured_\n\t- [Philosophy](#philosophy)\n\t- [Inline HTML](#html)\n", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 245, + "labelHeight": 76, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 12, + "x": 78, "y": 12 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 12, - "y": 362 + "x": 78, + "y": 414 }, "width": 113, "height": 126, @@ -153,11 +152,11 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, + "x": 134.5, "y": 138 }, { - "x": 68.5, + "x": 134.5, "y": 238 } ], @@ -192,12 +191,12 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, - "y": 262 + "x": 134.5, + "y": 314 }, { - "x": 68.5, - "y": 362 + "x": 134.5, + "y": 414 } ], "animated": false, @@ -205,8 +204,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/li2/elk/sketch.exp.svg b/e2etests/testdata/stable/li2/elk/sketch.exp.svg index 4ef05dfe32..ec6e371547 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="317" height="680" viewBox="-90 -90 317 680">

md

-
ab - +
+
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 8afce2b2ec..cf17e57c87 100644 --- a/e2etests/testdata/stable/li3/dagre/board.exp.json +++ b/e2etests/testdata/stable/li3/dagre/board.exp.json @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 45, + "x": 0, "y": 226 }, - "width": 23, - "height": 24, + "width": 347, + "height": 512, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "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", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 347, + "labelHeight": 512, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 0, + "x": 117, "y": 0 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 0, - "y": 350 + "x": 117, + "y": 838 }, "width": 113, "height": 126, @@ -153,19 +152,19 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, + "x": 173.5, "y": 126 }, { - "x": 56.5, + "x": 173.5, "y": 166 }, { - "x": 56.5, + "x": 173.5, "y": 186 }, { - "x": 56.5, + "x": 173.5, "y": 226 } ], @@ -201,20 +200,20 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, - "y": 250 + "x": 173.5, + "y": 738 }, { - "x": 56.5, - "y": 290 + "x": 173.5, + "y": 778 }, { - "x": 56.5, - "y": 310 + "x": 173.5, + "y": 798 }, { - "x": 56.5, - "y": 350 + "x": 173.5, + "y": 838 } ], "isCurve": true, @@ -223,8 +222,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/li3/dagre/sketch.exp.svg b/e2etests/testdata/stable/li3/dagre/sketch.exp.svg index 45afbcef4f..79b6f3dc9a 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="317" height="680" viewBox="-102 -102 317 680">

md

-
ab - +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 + \ 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 378f076e06..8d7adee0fc 100644 --- a/e2etests/testdata/stable/li4/elk/board.exp.json +++ b/e2etests/testdata/stable/li4/elk/board.exp.json @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 57, + "x": 12, "y": 238 }, - "width": 23, - "height": 24, + "width": 920, + "height": 376, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "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", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 920, + "labelHeight": 376, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 12, + "x": 415, "y": 12 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 12, - "y": 362 + "x": 415, + "y": 714 }, "width": 113, "height": 126, @@ -153,11 +152,11 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, + "x": 472, "y": 138 }, { - "x": 68.5, + "x": 472, "y": 238 } ], @@ -192,12 +191,12 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, - "y": 262 + "x": 472, + "y": 614 }, { - "x": 68.5, - "y": 362 + "x": 472, + "y": 714 } ], "animated": false, @@ -205,8 +204,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/li4/elk/sketch.exp.svg b/e2etests/testdata/stable/li4/elk/sketch.exp.svg index 4ef05dfe32..cf54ab7317 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="317" height="680" viewBox="-90 -90 317 680">

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 + \ 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 e2a1364d30..4738a11ec7 100644 --- a/e2etests/testdata/stable/links/dagre/board.exp.json +++ b/e2etests/testdata/stable/links/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -135,8 +134,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/links/elk/board.exp.json b/e2etests/testdata/stable/links/elk/board.exp.json index 2cfe7e2932..9831326400 100644 --- a/e2etests/testdata/stable/links/elk/board.exp.json +++ b/e2etests/testdata/stable/links/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -126,8 +125,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/lone_h1/dagre/board.exp.json b/e2etests/testdata/stable/lone_h1/dagre/board.exp.json index 8afce2b2ec..41a16bc394 100644 --- a/e2etests/testdata/stable/lone_h1/dagre/board.exp.json +++ b/e2etests/testdata/stable/lone_h1/dagre/board.exp.json @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 45, + "x": 0, "y": 226 }, - "width": 23, - "height": 24, + "width": 266, + "height": 51, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "\n# Markdown: Syntax\n", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 266, + "labelHeight": 51, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 0, + "x": 77, "y": 0 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 0, - "y": 350 + "x": 77, + "y": 377 }, "width": 113, "height": 126, @@ -153,19 +152,19 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, + "x": 133, "y": 126 }, { - "x": 56.5, + "x": 133, "y": 166 }, { - "x": 56.5, + "x": 133, "y": 186 }, { - "x": 56.5, + "x": 133, "y": 226 } ], @@ -201,20 +200,20 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, - "y": 250 + "x": 133, + "y": 277 }, { - "x": 56.5, - "y": 290 + "x": 133, + "y": 317 }, { - "x": 56.5, - "y": 310 + "x": 133, + "y": 337 }, { - "x": 56.5, - "y": 350 + "x": 133, + "y": 377 } ], "isCurve": true, @@ -223,8 +222,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/lone_h1/dagre/sketch.exp.svg b/e2etests/testdata/stable/lone_h1/dagre/sketch.exp.svg index 45afbcef4f..9cabf7c549 100644 --- a/e2etests/testdata/stable/lone_h1/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/lone_h1/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="317" height="680" viewBox="-102 -102 317 680">

md

-
ab - +

Markdown: Syntax

+
ab +

md

-
ab - +

Markdown: Syntax

+
ab +

hey

-
xy - +

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 + \ 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 3bde502bbc..3bfc5104ec 100644 --- a/e2etests/testdata/stable/markdown/elk/board.exp.json +++ b/e2etests/testdata/stable/markdown/elk/board.exp.json @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "hey", "type": "text", "pos": { - "x": 56, + "x": 12, "y": 238 }, - "width": 25, - "height": 24, + "width": 531, + "height": 187, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "hey", + "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.", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 25, - "labelHeight": 24, + "labelWidth": 531, + "labelHeight": 187, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "x", "type": "rectangle", "pos": { - "x": 12, + "x": 221, "y": 12 }, "width": 113, @@ -88,8 +87,8 @@ "id": "y", "type": "rectangle", "pos": { - "x": 12, - "y": 362 + "x": 220, + "y": 525 }, "width": 114, "height": 126, @@ -153,11 +152,11 @@ "labelPercentage": 0, "route": [ { - "x": 69, + "x": 277.5, "y": 138 }, { - "x": 69, + "x": 277.5, "y": 238 } ], @@ -192,12 +191,12 @@ "labelPercentage": 0, "route": [ { - "x": 69, - "y": 262 + "x": 277.5, + "y": 425 }, { - "x": 69, - "y": 362 + "x": 277.5, + "y": 525 } ], "animated": false, @@ -205,8 +204,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/markdown/elk/sketch.exp.svg b/e2etests/testdata/stable/markdown/elk/sketch.exp.svg index 43a84f23d8..b4afb768eb 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="318" height="680" viewBox="-90 -90 318 680">

hey

-
xy - +

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 + \ 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 a401deeefd..0a26c1fba5 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json +++ b/e2etests/testdata/stable/markdown_stroke_fill/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -10,8 +9,8 @@ "x": 0, "y": 0 }, - "width": 141, - "height": 124, + "width": 312, + "height": 358, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -48,11 +47,11 @@ "id": "container.md", "type": "text", "pos": { - "x": 69, + "x": 50, "y": 50 }, - "width": 23, - "height": 24, + "width": 212, + "height": 258, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -71,7 +70,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "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.", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -79,8 +78,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 212, + "labelHeight": 258, "zIndex": 0, "level": 2 }, @@ -88,10 +87,10 @@ "id": "no container", "type": "text", "pos": { - "x": 37, - "y": 224 + "x": 97, + "y": 458 }, - "width": 86, + "width": 118, "height": 24, "opacity": 1, "strokeDash": 0, @@ -111,7 +110,7 @@ "fields": null, "methods": null, "columns": null, - "label": "no container", + "label": "they did it in style", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -119,7 +118,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 86, + "labelWidth": 118, "labelHeight": 24, "zIndex": 0, "level": 1 @@ -152,20 +151,20 @@ "labelPercentage": 0, "route": [ { - "x": 80, - "y": 124 + "x": 156, + "y": 358 }, { - "x": 80, - "y": 164 + "x": 156, + "y": 398 }, { - "x": 80, - "y": 184 + "x": 156, + "y": 418 }, { - "x": 80, - "y": 224 + "x": 156, + "y": 458 } ], "isCurve": true, @@ -174,8 +173,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } 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 12a5a579b7..9199fb0e53 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="345" height="452" viewBox="-102 -102 345 452">container

no container

-

md

-
- +container

they did it in style

+

a header

+

a line of text and an

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

walk into a bar.

+
+ \ 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 9a8c454f7d..4837875369 100644 --- a/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json +++ b/e2etests/testdata/stable/markdown_stroke_fill/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -10,8 +9,8 @@ "x": 12, "y": 12 }, - "width": 173, - "height": 174, + "width": 362, + "height": 408, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -51,8 +50,8 @@ "x": 87, "y": 87 }, - "width": 23, - "height": 24, + "width": 212, + "height": 258, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -71,7 +70,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "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.", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -79,8 +78,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 212, + "labelHeight": 258, "zIndex": 0, "level": 2 }, @@ -88,10 +87,10 @@ "id": "no container", "type": "text", "pos": { - "x": 55, - "y": 286 + "x": 134, + "y": 520 }, - "width": 86, + "width": 118, "height": 24, "opacity": 1, "strokeDash": 0, @@ -111,7 +110,7 @@ "fields": null, "methods": null, "columns": null, - "label": "no container", + "label": "they did it in style", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -119,7 +118,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 86, + "labelWidth": 118, "labelHeight": 24, "zIndex": 0, "level": 1 @@ -152,12 +151,12 @@ "labelPercentage": 0, "route": [ { - "x": 98.5, - "y": 186 + "x": 193, + "y": 420 }, { - "x": 98.5, - "y": 286 + "x": 193, + "y": 520 } ], "animated": false, @@ -165,8 +164,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } 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 2b5c0bdc40..47a616313f 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="377" height="502" viewBox="-90 -90 377 502">container

no container

-

md

-
- +container

they did it in style

+

a header

+

a line of text and an

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

walk into a bar.

+
+ \ 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 5e6f08b8e3..ca068a1757 100644 --- a/e2etests/testdata/stable/md_2space_newline/dagre/board.exp.json +++ b/e2etests/testdata/stable/md_2space_newline/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -10,8 +9,8 @@ "x": 0, "y": 0 }, - "width": 123, - "height": 124, + "width": 559, + "height": 148, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -51,8 +50,8 @@ "x": 50, "y": 50 }, - "width": 23, - "height": 24, + "width": 459, + "height": 48, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -71,7 +70,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, \nsed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -79,14 +78,11 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 459, + "labelHeight": 48, "zIndex": 0, "level": 2 } ], - "connections": [], - "layers": null, - "scenarios": null, - "steps": null + "connections": [] } 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 f9a7778c14..36ed07dc84 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="327" height="328" viewBox="-102 -102 327 328">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

-
- +markdown

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

+
+

md

-
ab - +
{
+	fenced: "block",
+	of: "json",
+}
+
+
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 378f076e06..eb626481e0 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 @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 57, + "x": 12, "y": 238 }, - "width": 23, - "height": 24, + "width": 196, + "height": 111, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "```\n{\n\tfenced: \"block\",\n\tof: \"json\",\n}\n```", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 196, + "labelHeight": 111, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 12, + "x": 53, "y": 12 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 12, - "y": 362 + "x": 53, + "y": 449 }, "width": 113, "height": 126, @@ -153,11 +152,11 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, + "x": 110, "y": 138 }, { - "x": 68.5, + "x": 110, "y": 238 } ], @@ -192,12 +191,12 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, - "y": 262 + "x": 110, + "y": 349 }, { - "x": 68.5, - "y": 362 + "x": 110, + "y": 449 } ], "animated": false, @@ -205,8 +204,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } 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 4ef05dfe32..be99778e51 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="317" height="680" viewBox="-90 -90 317 680">

md

-
ab - +
{
+	fenced: "block",
+	of: "json",
+}
+
+
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 8afce2b2ec..0223e1d152 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 @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 45, + "x": 0, "y": 226 }, - "width": 23, - "height": 24, + "width": 212, + "height": 151, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "a line of text and an\n\n\t{\n\t\tindented: \"block\",\n\t\tof: \"json\",\n\t}\n", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 212, + "labelHeight": 151, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 0, + "x": 50, "y": 0 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 0, - "y": 350 + "x": 50, + "y": 477 }, "width": 113, "height": 126, @@ -153,19 +152,19 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, + "x": 106, "y": 126 }, { - "x": 56.5, + "x": 106, "y": 166 }, { - "x": 56.5, + "x": 106, "y": 186 }, { - "x": 56.5, + "x": 106, "y": 226 } ], @@ -201,20 +200,20 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, - "y": 250 + "x": 106, + "y": 377 }, { - "x": 56.5, - "y": 290 + "x": 106, + "y": 417 }, { - "x": 56.5, - "y": 310 + "x": 106, + "y": 437 }, { - "x": 56.5, - "y": 350 + "x": 106, + "y": 477 } ], "isCurve": true, @@ -223,8 +222,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } 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 45afbcef4f..df307133b2 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="317" height="680" viewBox="-102 -102 317 680">

md

-
ab - +

a line of text and an

+
{
+	indented: "block",
+	of: "json",
+}
+
+
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 378f076e06..e105f60d95 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 @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 57, + "x": 12, "y": 238 }, - "width": 23, - "height": 24, + "width": 212, + "height": 151, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "a line of text and an\n\n\t{\n\t\tindented: \"block\",\n\t\tof: \"json\",\n\t}\n", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 212, + "labelHeight": 151, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 12, + "x": 61, "y": 12 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 12, - "y": 362 + "x": 61, + "y": 489 }, "width": 113, "height": 126, @@ -153,11 +152,11 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, + "x": 118, "y": 138 }, { - "x": 68.5, + "x": 118, "y": 238 } ], @@ -192,12 +191,12 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, - "y": 262 + "x": 118, + "y": 389 }, { - "x": 68.5, - "y": 362 + "x": 118, + "y": 489 } ], "animated": false, @@ -205,8 +204,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } 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 4ef05dfe32..72e9523a3f 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="317" height="680" viewBox="-90 -90 317 680">

md

-
ab - +

a line of text and an

+
{
+	indented: "block",
+	of: "json",
+}
+
+
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 8afce2b2ec..a9a1beafd3 100644 --- a/e2etests/testdata/stable/md_code_inline/dagre/board.exp.json +++ b/e2etests/testdata/stable/md_code_inline/dagre/board.exp.json @@ -1,16 +1,15 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 45, + "x": 34, "y": 226 }, - "width": 23, + "width": 46, "height": 24, "opacity": 1, "strokeDash": 0, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "`code`", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,7 +37,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, + "labelWidth": 46, "labelHeight": 24, "zIndex": 0, "level": 1 @@ -223,8 +222,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } 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 45afbcef4f..822843aa76 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">

md

-
ab +

code

+
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 378f076e06..e5e6c9f3a3 100644 --- a/e2etests/testdata/stable/md_code_inline/elk/board.exp.json +++ b/e2etests/testdata/stable/md_code_inline/elk/board.exp.json @@ -1,16 +1,15 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 57, + "x": 45, "y": 238 }, - "width": 23, + "width": 46, "height": 24, "opacity": 1, "strokeDash": 0, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "`code`", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,7 +37,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, + "labelWidth": 46, "labelHeight": 24, "zIndex": 0, "level": 1 @@ -205,8 +204,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } 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 4ef05dfe32..b6f5cec534 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">

md

-
ab +

code

+
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 9082b7e6ff..e0a5a882b9 100644 --- a/e2etests/testdata/stable/multiline_text/dagre/board.exp.json +++ b/e2etests/testdata/stable/multiline_text/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -45,8 +44,5 @@ "level": 1 } ], - "connections": [], - "layers": null, - "scenarios": null, - "steps": null + "connections": [] } diff --git a/e2etests/testdata/stable/multiline_text/elk/board.exp.json b/e2etests/testdata/stable/multiline_text/elk/board.exp.json index 1d8fb4a009..01651f58b5 100644 --- a/e2etests/testdata/stable/multiline_text/elk/board.exp.json +++ b/e2etests/testdata/stable/multiline_text/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -45,8 +44,5 @@ "level": 1 } ], - "connections": [], - "layers": null, - "scenarios": null, - "steps": null + "connections": [] } diff --git a/e2etests/testdata/stable/multiple_trees/dagre/board.exp.json b/e2etests/testdata/stable/multiple_trees/dagre/board.exp.json index 96e4417e2e..df1eabf424 100644 --- a/e2etests/testdata/stable/multiple_trees/dagre/board.exp.json +++ b/e2etests/testdata/stable/multiple_trees/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -2004,8 +2003,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/multiple_trees/elk/board.exp.json b/e2etests/testdata/stable/multiple_trees/elk/board.exp.json index f78ee49241..13b9ed5d32 100644 --- a/e2etests/testdata/stable/multiple_trees/elk/board.exp.json +++ b/e2etests/testdata/stable/multiple_trees/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -1902,8 +1901,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/n22_e32/dagre/board.exp.json b/e2etests/testdata/stable/n22_e32/dagre/board.exp.json index 76efda9d6b..62f4088a91 100644 --- a/e2etests/testdata/stable/n22_e32/dagre/board.exp.json +++ b/e2etests/testdata/stable/n22_e32/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -2834,8 +2833,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/n22_e32/elk/board.exp.json b/e2etests/testdata/stable/n22_e32/elk/board.exp.json index 0025e5463c..0302d0591c 100644 --- a/e2etests/testdata/stable/n22_e32/elk/board.exp.json +++ b/e2etests/testdata/stable/n22_e32/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -2337,8 +2336,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/near-alone/dagre/board.exp.json b/e2etests/testdata/stable/near-alone/dagre/board.exp.json index 7ee1feda1d..4b51e2d280 100644 --- a/e2etests/testdata/stable/near-alone/dagre/board.exp.json +++ b/e2etests/testdata/stable/near-alone/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -127,8 +126,5 @@ "level": 1 } ], - "connections": [], - "layers": null, - "scenarios": null, - "steps": null + "connections": [] } diff --git a/e2etests/testdata/stable/near-alone/elk/board.exp.json b/e2etests/testdata/stable/near-alone/elk/board.exp.json index 7ee1feda1d..4b51e2d280 100644 --- a/e2etests/testdata/stable/near-alone/elk/board.exp.json +++ b/e2etests/testdata/stable/near-alone/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -127,8 +126,5 @@ "level": 1 } ], - "connections": [], - "layers": null, - "scenarios": null, - "steps": null + "connections": [] } diff --git a/e2etests/testdata/stable/number_connections/dagre/board.exp.json b/e2etests/testdata/stable/number_connections/dagre/board.exp.json index 5ab288a9cc..02e7c249c4 100644 --- a/e2etests/testdata/stable/number_connections/dagre/board.exp.json +++ b/e2etests/testdata/stable/number_connections/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -265,8 +264,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/number_connections/elk/board.exp.json b/e2etests/testdata/stable/number_connections/elk/board.exp.json index 37ffafb604..1beabe14c1 100644 --- a/e2etests/testdata/stable/number_connections/elk/board.exp.json +++ b/e2etests/testdata/stable/number_connections/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -247,8 +246,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/one_container_loop/dagre/board.exp.json b/e2etests/testdata/stable/one_container_loop/dagre/board.exp.json index b1c4e46960..f294ce8c1a 100644 --- a/e2etests/testdata/stable/one_container_loop/dagre/board.exp.json +++ b/e2etests/testdata/stable/one_container_loop/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -777,8 +776,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/one_container_loop/elk/board.exp.json b/e2etests/testdata/stable/one_container_loop/elk/board.exp.json index 24fea15c7c..3c2ccd4c91 100644 --- a/e2etests/testdata/stable/one_container_loop/elk/board.exp.json +++ b/e2etests/testdata/stable/one_container_loop/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -638,8 +637,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/one_three_one_container/dagre/board.exp.json b/e2etests/testdata/stable/one_three_one_container/dagre/board.exp.json index c5a13cebfa..5087b5bc66 100644 --- a/e2etests/testdata/stable/one_three_one_container/dagre/board.exp.json +++ b/e2etests/testdata/stable/one_three_one_container/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -580,8 +579,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/one_three_one_container/elk/board.exp.json b/e2etests/testdata/stable/one_three_one_container/elk/board.exp.json index 6fce664536..25474845dd 100644 --- a/e2etests/testdata/stable/one_three_one_container/elk/board.exp.json +++ b/e2etests/testdata/stable/one_three_one_container/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -558,8 +557,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/overlapping_image_container_labels/dagre/board.exp.json b/e2etests/testdata/stable/overlapping_image_container_labels/dagre/board.exp.json index be13cdf308..8eaefec777 100644 --- a/e2etests/testdata/stable/overlapping_image_container_labels/dagre/board.exp.json +++ b/e2etests/testdata/stable/overlapping_image_container_labels/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -962,8 +961,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/overlapping_image_container_labels/elk/board.exp.json b/e2etests/testdata/stable/overlapping_image_container_labels/elk/board.exp.json index 32fa96ac30..cfb6d70a03 100644 --- a/e2etests/testdata/stable/overlapping_image_container_labels/elk/board.exp.json +++ b/e2etests/testdata/stable/overlapping_image_container_labels/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -939,8 +938,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/p/dagre/board.exp.json b/e2etests/testdata/stable/p/dagre/board.exp.json index 8afce2b2ec..ced611d999 100644 --- a/e2etests/testdata/stable/p/dagre/board.exp.json +++ b/e2etests/testdata/stable/p/dagre/board.exp.json @@ -1,16 +1,15 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 45, + "x": 0, "y": 226 }, - "width": 23, + "width": 1857, "height": 24, "opacity": 1, "strokeDash": 0, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "label": "\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", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,7 +37,7 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, + "labelWidth": 1857, "labelHeight": 24, "zIndex": 0, "level": 1 @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 0, + "x": 872, "y": 0 }, "width": 113, @@ -88,7 +87,7 @@ "id": "b", "type": "rectangle", "pos": { - "x": 0, + "x": 872, "y": 350 }, "width": 113, @@ -153,19 +152,19 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, + "x": 928.5, "y": 126 }, { - "x": 56.5, + "x": 928.5, "y": 166 }, { - "x": 56.5, + "x": 928.5, "y": 186 }, { - "x": 56.5, + "x": 928.5, "y": 226 } ], @@ -201,19 +200,19 @@ "labelPercentage": 0, "route": [ { - "x": 56.5, + "x": 928.5, "y": 250 }, { - "x": 56.5, + "x": 928.5, "y": 290 }, { - "x": 56.5, + "x": 928.5, "y": 310 }, { - "x": 56.5, + "x": 928.5, "y": 350 } ], @@ -223,8 +222,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/p/dagre/sketch.exp.svg b/e2etests/testdata/stable/p/dagre/sketch.exp.svg index 45afbcef4f..4ea52597bd 100644 --- a/e2etests/testdata/stable/p/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/p/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="317" height="680" viewBox="-102 -102 317 680">

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 - +

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 + \ 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 378f076e06..19f4e87c22 100644 --- a/e2etests/testdata/stable/pre/elk/board.exp.json +++ b/e2etests/testdata/stable/pre/elk/board.exp.json @@ -1,17 +1,16 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { "id": "md", "type": "text", "pos": { - "x": 57, + "x": 12, "y": 238 }, - "width": 23, - "height": 24, + "width": 602, + "height": 170, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -30,7 +29,7 @@ "fields": null, "methods": null, "columns": null, - "label": "md", + "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", "fontSize": 16, "fontFamily": "DEFAULT", "language": "markdown", @@ -38,8 +37,8 @@ "italic": false, "bold": false, "underline": false, - "labelWidth": 23, - "labelHeight": 24, + "labelWidth": 602, + "labelHeight": 170, "zIndex": 0, "level": 1 }, @@ -47,7 +46,7 @@ "id": "a", "type": "rectangle", "pos": { - "x": 12, + "x": 256, "y": 12 }, "width": 113, @@ -88,8 +87,8 @@ "id": "b", "type": "rectangle", "pos": { - "x": 12, - "y": 362 + "x": 256, + "y": 508 }, "width": 113, "height": 126, @@ -153,11 +152,11 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, + "x": 313, "y": 138 }, { - "x": 68.5, + "x": 313, "y": 238 } ], @@ -192,12 +191,12 @@ "labelPercentage": 0, "route": [ { - "x": 68.5, - "y": 262 + "x": 313, + "y": 408 }, { - "x": 68.5, - "y": 362 + "x": 313, + "y": 508 } ], "animated": false, @@ -205,8 +204,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/pre/elk/sketch.exp.svg b/e2etests/testdata/stable/pre/elk/sketch.exp.svg index 4ef05dfe32..b7c2f8e1d9 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="317" height="680" viewBox="-90 -90 317 680">

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 + \ 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 7ace108ad9..e160e1cf39 100644 --- a/e2etests/testdata/stable/self-referencing/dagre/board.exp.json +++ b/e2etests/testdata/stable/self-referencing/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -476,8 +475,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/self-referencing/elk/board.exp.json b/e2etests/testdata/stable/self-referencing/elk/board.exp.json index 573aa1eb69..86753ffd98 100644 --- a/e2etests/testdata/stable/self-referencing/elk/board.exp.json +++ b/e2etests/testdata/stable/self-referencing/elk/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -355,8 +354,5 @@ "icon": null, "zIndex": 0 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/sequence-inter-span-self/dagre/board.exp.json b/e2etests/testdata/stable/sequence-inter-span-self/dagre/board.exp.json index 3c820f9163..4339763f81 100644 --- a/e2etests/testdata/stable/sequence-inter-span-self/dagre/board.exp.json +++ b/e2etests/testdata/stable/sequence-inter-span-self/dagre/board.exp.json @@ -1,6 +1,5 @@ { "name": "", - "type": "", "fontFamily": "SourceSansPro", "shapes": [ { @@ -89,10 +88,10 @@ "type": "rectangle", "pos": { "x": 93, - "y": 394 + "y": 524 }, "width": 12, - "height": 212, + "height": 82, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -194,19 +193,19 @@ "route": [ { "x": 105, - "y": 330 + "y": 460 }, { "x": 199, - "y": 330 + "y": 460 }, { "x": 199, - "y": 410 + "y": 540 }, { "x": 105, - "y": 410 + "y": 540 } ], "animated": false, @@ -241,11 +240,11 @@ "route": [ { "x": 105, - "y": 460 + "y": 330 }, { "x": 349, - "y": 460 + "y": 330 } ], "animated": false, @@ -291,87 +290,6 @@ "tooltip": "", "icon": null, "zIndex": 4 - }, - { - "id": "(a -- )[0]", - "src": "a", - "srcArrow": "none", - "srcLabel": "", - "dst": "a-lifeline-end-2251863791", - "dstArrow": "none", - "dstLabel": "", - "opacity": 1, - "strokeDash": 6, - "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": 99, - "y": 200 - }, - { - "x": 99, - "y": 720 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 1 - }, - { - "id": "(b -- )[0]", - "src": "b", - "srcArrow": "none", - "srcLabel": "", - "dst": "b-lifeline-end-668380428", - "dstArrow": "none", - "dstLabel": "", - "opacity": 1, - "strokeDash": 6, - "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": 349, - "y": 200 - }, - { - "x": 349, - "y": 720 - } - ], - "animated": false, - "tooltip": "", - "icon": null, - "zIndex": 1 } - ], - "layers": null, - "scenarios": null, - "steps": null + ] } diff --git a/e2etests/testdata/stable/sequence-inter-span-self/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence-inter-span-self/dagre/sketch.exp.svg index 033d298b0e..67011eaf37 100644 --- a/e2etests/testdata/stable/sequence-inter-span-self/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence-inter-span-self/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="604" height="848" viewBox="-78 -28 604 848">