github typstyle-rs/typstyle v0.13.9

latest releases: v0.14.4, v0.14.3, v0.14.2...
12 months ago
  • Feature: typstyle now evaluates simple constant expressions for table columns. This enhancement allows for better column count calculation in tables. For example, if you have a table with a column count defined as ((1fr,) * 2 + 2 * (auto,)) * 3, typstyle will now correctly interpret this as 12 columns.

  • Feature: typstyle now uses soft wrapping for import items. Import statements with long lists of items will now wrap more compact. This aligns with rustfmt's approach to formatting long import lists.

  • Feature: typstyle no longer collapses consecutive spaces in markup by default. This change preserves intentional spacing in markup content, maintaining the author's formatting intentions.

  • Feature: typstyle no longer adds padding to the last cell in math alignments. For example, in cases() expressions, the formatter will no longer add trailing spaces after the last cell, keeping comments properly aligned without unnecessary padding.

  • Enhancement: typstyle now formats tables in most cases, and format headers and footers as tables. This major enhancement provides better support for complex table structures.

  • Enhancement: improved detection of table and grid elements. Special rows (header, footer) and cells (cell, hline, vline) are now recognized without needing the grid. or table. prefix.

  • Bug fix: typstyle now preserves backslashes in single-row aligned math equations. This addresses a missed case from #294 where expressions like math.equation($ 1 & 2 \ $.body + $ & 4 \ $.body) would incorrectly have their backslashes removed.

  • Bug fix: typstyle now handles escape hatch comments (@typstyle off) better in corner cases. Previously, escape hatch did not work for ArrayItem, DictItem, Param, and DestructuringItem. Additionally, @typstyle off no longer penetrates comments, and when it appears before Code or Math, it now only applies to the first non-trivial child instead of the whole syntax node.

Don't miss a new typstyle release

NewReleases is sending notifications on new releases.