v0.2.6

d2lang/d2v0.2.6Mar 18, 2023by alixander

AI Summary

This minor release adds CLI usability features like centering SVGs and Markdown strikethrough support, while improving layout engines and error handling.

Key Highlights

  • The `--center` flag centers the SVG in the containing viewbox.
  • Strikethrough support in Markdown using `~~`.
  • ELK layout containers no longer overlap the label with children.
  • Better error messages for improper style keyword usage.

New Features

  • `--center` flag centers the SVG
  • Strikethrough in Markdown

Full Release Notes

#### Features ๐Ÿš€

- `--center` flag centers the SVG in the containing viewbox. [#1056](https://github.com/terrastruct/d2/pull/1056)
- Strikethrough in Markdown with `~~`. [#1059](https://github.com/terrastruct/d2/pull/1059)

#### Improvements ๐Ÿงน

- `elk` layout containers no longer overlap the label with children. [#1055](https://github.com/terrastruct/d2/pull/1055)
- `--browser` flag on CLI controls `BROWSER` environment variable for not opening browser in watch mode. [#1052](https://github.com/terrastruct/d2/pull/1052)
- Message emitted by CLI when a particular stage is taking a long time. [#1058](https://github.com/terrastruct/d2/pull/1058)
- `<title>` attribute of HTML in watch mode is the base file name, instead of the whole path. [#1054](https://github.com/terrastruct/d2/pull/1054)

#### Bugfixes โ›‘๏ธ

- Code blocks are not affected by uppercasing from special themes like Terminal. [#1053](https://github.com/terrastruct/d2/pull/1053)
- Fixes `fill-pattern` replacement in the API. [#1051](https://github.com/terrastruct/d2/pull/1051)
- Fixes multiple `<br/>` elements in a row being mismeasured in Markdown blocks. [#1060](https://github.com/terrastruct/d2/pull/1060)