CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 19
Releases: typstyle-rs/typstyle
v0.13.16
Compare
- Due to ci configuration issues, we failed to publish v0.13.15. This release is a re-publish of v0.13.15 with the correct version number.
v0.13.15 - [2025-07-18]
-
Feature(CLI): Add
--diff
option to show unified diff of formatting changes. This allows users to preview what changes would be made before applying formatting.For example:
typstyle file.typ --diff
Output:
--- file.typ +++ file.typ @@ -1,3 +1,3 @@ -#let x=1+2 -#let y=(3*4) +#let x = 1 + 2 +#let y = (3 * 4)
-
Feature: Improve comment handling - line comments are now treated as line suffixes instead of separate lines, resulting in more compact and natural formatting.
For example, The following code will be accepted by typstyle now:
#let result = (x + y) / 2 + 1 // This comment stays on same line
But it will be formatted to this in previous versions. Note that the comment was moved to a new line, which is not ideal for inline comments.
// line width = 40 #let result = ( (x + y) / 2 + 1 ) // This comment stays on same line
-
Feature: Add support for sharing links in the web playground, making it easier to share formatted code snippets with others for demo or collaboration.
-
Performance: Bump prettyless to v0.3.0. This slightly improves performance and lowers memory consumption during formatting.
Assets 26
- sha256:c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4
2025-07-19T05:54:45Z - sha256:28c570024b041f7c71700e4263327f6fe480e1613b5e668180b6222f276e3469
2025-07-19T05:54:45Z - sha256:025c8ec0573191144b9ed7a382ed9995fbad531b3fb039e756bdddf8e5e863d0
2025-07-19T05:54:45Z - sha256:27760fb29e923a6bca5dfc9a1cccaffa485c47fe532ec392bbb456abdfa5a4ea
2025-07-19T05:54:50Z - sha256:5a482fce9fb5787a1283136fcff76de26e4fd34579e449568e953fa43dabc47e
2025-07-19T05:54:49Z - sha256:1ffdf8bc38d5906f52128f0a66d9a0d0e9e858425437df9d3443778a8218b15d
2025-07-19T05:54:49Z - sha256:61971533b344c6ba8a1f4427165db5e102b017953559136e9cec2e690bc780eb
2025-07-19T05:54:48Z - sha256:57ec033da0f28553d7f5b148c18d6081908255ed9ba4f248be64c288a8f505b6
2025-07-19T05:54:47Z - sha256:9295b5782e2d99e53666ac2e1c00f17282cd34fc58e12fe589ef6318852a8d00
2025-07-19T05:54:47Z - sha256:6e9aa6301076a279194c4662564aa1ff0e68948c2734a732ba4353631a7f6e82
2025-07-19T05:54:46Z -
2025-07-19T05:51:50Z -
2025-07-19T05:51:50Z - Loading
v0.13.14
Compare
We now employ prettyless as the layout engine. It provides more features to support us to adopt better layout logic.
-
Feature: Long lines after the first line will no longer cause compact layout to fail to fit.
For example:#figure(caption: [], { "looooooooooooooooooooooooooong" })
It now fits in the compact layout regardless of the length of any long line in the code block.
-
Feature: We now respect the flavor of arguments in any case, except that the sole argument is a code block, which is always folded. This reverts the behavior of "force folding" when the sole argument is combinable, so that users can freely decide whether the argument should be compact. This change is expected not to affect your code if it is already compact.
For example:#f( (1, 2, 3) )
was formatted to
#f((1, 2, 3))
Now it is kept unchanged given its multiline flavor.
-
Bug fix: In code mode,
std.table
was not recognized as a table function, preventing proper table formatting. -
Bug fix: Fixed incorrect formatting of table functions with empty content blocks.
Whentable.header
ortable.footer
had no parentheses (()
), the formatter would incorrectly add parentheses before empty content blocks. When parenthesized args are empty, the formatter would insert a line break with short line length.
For example:#table( columns: 2, table.header[], table.footer(), )
was formatted to:
#table( columns: 2, table.header()[], table.footer(), )
or with short line length:
#table( columns: 2, table.header( )[], table.footer( ), )
-
Bug fix: Fixed incorrect handling of trailing content blocks in set rules.
Previously, when there were no parentheses, a following content block would be wrapped by()
; when parentheses were already present, any trailing content block was dropped.
For example:#set circle[1] #set circle()[1] #set circle(stroke: blue)[1]
was previously formatted to:
#set circle([1]) #set circle() #set circle(stroke: blue)
Assets 18
v0.13.13
36a3d14
Compare
- Bug fix(CI): Fixed a CI misconfiguration that prevented the release of v0.13.12.
v0.13.12 - [2025-07-02]
🎉 typstyle has moved to https://github.com/typstyle-rs/typstyle !
-
Bug fix(#334): Fixed incorrect formatting when term description is empty in definition lists.
-
Feature: Improved argument layout logic - do not use compact layout when arguments have multiline flavor, providing better formatting for complex function calls.
-
Feature: Enhanced math formatting - no longer align backslashes in mathematical expressions for cleaner output.
-
Feature: Introduced
typstyle-typlugin
crate for embedding typstyle as a WebAssembly plugin within Typst documents.
Assets 18
v0.13.11
Compare
-
Feature(CLI): (breaking) Removed deprecated
format-all
command from CLI. This command was previously deprecated and has now been completely removed. Users should usetypstyle <dir> -i
instead. -
Feature(CLI): Added
--timing
option to CLI for displaying elapsed time during formatting operations. Users can now monitor the performance of formatting operations with this new debug flag. -
Feature: Empty code blocks no longer get extra spaces added.
For example,#{}
will now be formatted as#{}
instead of#{ }
. This aligns with the behavior of most code formatters. -
Enhancement: Labels are no longer reflowed to the next line with text wrapping enabled.
-
Bug fix: Texts spanning multiple lines, such as strings, inline raws, or syntax nodes marked
typstyle off
are correctly layouted according to their line widths. -
Bug fix: When the last arg of func call is not combinable, the flavor is respect.
Assets 18
v0.13.10
Compare
-
Bug fix: Fixed unexpected semicolon to comma conversion in nested math arguments. Previously, typstyle would incorrectly convert semicolons to commas in complex nested mathematical expressions like
$mat(mat(1; 2); mat(3; 4))$
. -
Refactor: Extracted WASM features into a separate
typstyle-wasm
crate. This improves the modular architecture by separating WebAssembly-specific functionality from the core library. -
API Enhancement: Added rendering IR functionality to the formatter. The
Formatter
now provides arender_ir()
method that allows developers to inspect the pretty-printing intermediate representation, which can be useful for debugging and understanding the formatting process.
Assets 18
v0.13.9
Compare
-
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 thegrid.
ortable.
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 forArrayItem
,DictItem
,Param
, andDestructuringItem
. Additionally,@typstyle off
no longer penetrates comments, and when it appears beforeCode
orMath
, it now only applies to the first non-trivial child instead of the whole syntax node.
Assets 18
v0.13.8
Compare
- Bug fix: typstyle previously will break inline equations if they has alignments. Now it is fixed. It will never add paddings to align inline equations now.
- Feature: typstyle doesn't enforce trailing backslash in math equations with alignments now.
- Feature: Previously, typstyle will try to put the last argument of a function call in the same line as the function call when certain conditions are met. Now it is enhanced. In this version, if the last argument is an array or a dict, typstyle will only do this if it is the only array/dict argument.
Assets 18
v0.13.7
Compare
- Cli: typstyle now supports formatting dirs natively. You can use
typstyle -i <dir>
to format all files in the directory. Given that,typstyle format-all
is deprecated and will be removed in the future. - Cli: typstyle now uses
-l
or--line-width
instead of-c
/--column
to specify the line width. The-c
/--column
option is deprecated and will be removed in the future. - Cli: typstyle now uses
--indent-width
instead of--tab-width
to specify the indent width. The--tab-width
option is deprecated and will be removed in the future. However,-t
is still available. - Feature: when
--wrap-text
is enabled, typstyle will now keep the line breaks after backslashes in markup. Previously, it is not treated specially. - Feature: typstyle now keep spaces around fractions in math equations. Previously, it always added a space before and after the fraction.
Assets 18
v0.13.6
Compare
Changelog
v0.13.6 - [2025-05-11]
- Bug fix: #272. Previously, typstyle will remove the space between variable and underscore in math equations.
$ #mysum _(i=0) $
for example, will be formatted as$ #mysum_(i=0) $
. Now it is fixed. - Enhancement: #273. When formatting math equations with alignments and multiline cells, previous typstyle versions will introduce excessive spaces. Now it is fixed.
- Enhancement: #280. When wrap text is enabled, previous typstyle will mess up the formatting of labels. Now it is fixed.
v0.13.5 - [2025-05-07]
- Bug fix: Typstyle previously will panic if there is only a space in math function call. Now it is fixed.
- Bug fix: Typstyle previously will not converge if there are multiple newlines in a function call. Now it is fixed.
v0.13.4 - [2025-04-30]
-
Feature: typstyle cli now enables import sorting by default. You can disable it with
--no-reorder-import-items
flag. -
Feature: typstyle now supports
--wrap-text
flag to wrap texts in the markup. It is considered as experimental and may not work in all cases. Please report any issues you encounter.For example, this code:
Let's say you have a long text that needs to be wrapped in the markup. This is a very long sentence that needs to be wrapped in the markup. It should be wrapped in the markup.
Will be formatted as following when column width is 80 and
--wrap-text
is enabled:Let's say you have a long text that needs to be wrapped in the markup. This is a very long sentence that needs to be wrapped in the markup. It should be wrapped in the markup.
-
Feature: typstyle now tries to align
&
s in math equations, even if the cells are multiline. Currently it it works in most cases, except the following:- Has multiline
Str
orRaw
descendants. - Not following a linebreak when in
MathDelimited
orArgs
. - Across args of functions such as
cases
.
For example, this code:
$ F_n &= sum_(i=1)^n i^2 & n > 0 \ a &< b+1 & forall b < 1 $
Will be formatted as:
$ F_n & = sum_(i=1)^n i^2 & n > 0 \ a & < b+1 & forall b < 1 \ $
- Has multiline
-
Feature: typstyle now generate more compact result when formatting complex function calls. Similar to what rustfmt does, when the only argument is combinable, it will be put in the same line as the function call. When the last argument is blocky, it will also be put in the same line if possible.
For example, this code:
#figure( fletcher.diagram( node-outset: .5em, node-stroke: .075em, node( (+1,0,), [variable], radius: 3em, ), // test ))
Will be formatted as:
#figure(fletcher.diagram( node-outset: .5em, node-stroke: .075em, node((+1, 0), [variable], radius: 3em), // test ))
For another example, this code:
#set page( margin: 0.5in, footer: context { if counter(page).display() == "2" { [test] } else { [] } } )
Will be formatted as:
#set page(margin: 0.5in, footer: context { if counter(page).display() == "2" { [test] } else { [] } })
Due to the limitations of the currently used pretty engine, there is still room for improvement in some cases.
v0.13.3 - [2025-04-10]
- Feature: Unified equation layout and removed indent for non-block equations
- Non-block equations are no longer indented, which works well in most reasonable cases
- Nodes with multiline comments are now treated as multiline
- Improved comment attachment mechanism
- Fix: Improved handling of comments directly in equations and spaces in math
- Correctly handles in-equation comments before and after
Math
- Fixed infinite spaces added before
//
in math - Fixed extra indent of array args in math
- Optimized spaces handling in
MathAttach
andMathRoot
- Correctly handles in-equation comments before and after
- Fix: Addressed list layout issues
- Fixed indent and grouping issues in list layouts
- Fixed missing separators in list layouts mixed with comments
v0.13.2 - [2025-03-28]
- Feature: Typstyle can format code in markup lines now. Linebreaks are suppressed inside to ensure compact layout.
- Feature: Typstyle can format math equations with comments and hashes now. Previously they are skipped.
- Feature: Improved formatting of math delimited. Linebreaks are kept as is.
- Experimental feature: Typstyle CLI will sort import items in a single import statement if
--reorder-import-items
is passed. It would be enabled by default in the future. - Added a 3rd-party typstyle-action maintained by @grayespinoza.
v0.13.1 - [2025-03-20]
- Bump to typst v0.13.1
- Typstyle now uses braces ({}) instead of parens (()) when the closure body is not a chainable binary expression
#fun(() => {
aaa
})
instead of
#fun(() => (
aaa
))
- Fix mis-format when linebreak
\
appears at the end of a inline math equation. - Fix mis-format when line comment appears in a multiline
import
statement.
v0.13.0 - [2025-02-22]
- Bump to typst v0.13.0
- Regression: In typst v0.13.0, PR #5310 changes the parsing behavior of comments when it presenting in list, enum and term list. In this verison, the indent level of the comment in list, enum and term list determined by the next item, not the previous item. For example,
- Fruit
- Apple
- Banana
// - Orange
- Vegetable
- Carrot
- Tomato
will be formatted as this in this version. Note that the // - Orange
is misindented. It is indented to the same level as - Vegetable
. It works perfectly in previous versions. So if you want to keep the old behavior, please keep using typstyle v0.12.x at this moment.
- Fruit
- Apple
- Banana
// - Orange
- Vegetable
- Carrot
- Tomato
v0.12.15 - [2025-02-16]
- Feat: add
--tab-width
cli option to set the number of spaces for indentation. The default value is 2. - Fix: typstyle-cli now outputs the original source when the input syntax is erroneous.
- Fix: issues with list/enum/term item indent and linebreak with comments are fixed. Now linebreaks in items are preserved. Items in content blocks will be surrounded with linebreaks when necessary (also to avoid ambiguity).
For example, the code
+
+ xyz
-
xyz
- //foo
- xyz
//bar
/ 4:
// 4
/ 44: // 44
444
was incorrectly formatted to
+ + xyz
- xyz
- //foo
- xyz
//bar
/ 4: // 4
/ 44: // 44
444
Now it is correctly unchanged.
And
#{
[- single]
[- indented
- less
]
[- indented
- same
- then less
- then same
]
[- indented
- more
- then same
- then less
]
}
will be correctly formatted to
#{
[- single]
[
- indented
- less
]
[
- indented
- same
- then less
- then same
]
[
- indented
- more
- then same
- then less
]
}
v0.12.14 - [2024-12-27]
- Fix: typstyle-cli previously add an extra newline at the end of the file. Now it is fixed.
- Fix: typstyle now correctly strip leading spaces in markup
- Feat: typstyle-core now has very basic support for range formatting.
v0.12.13 - [2024-12-21]
- Fix: typstyle previously incorrectly remove comments in math equations. Now it is fixed.
- Cli:
- typstyle now reports error when the input file is invalid.
typstyle --check
no longer changes the file content.- Other minor improvements.
v0.12.12 - [2024-12-16]
No changes. We failed to publish the previous release because of the ci issue.
v0.12.11 - [2024-12-16]
Packaging: We've split typstyle crate into two independent crates: typstyle
and typstyle-core
. typstyle
is the CLI tool, and typstyle-core
is the core library. The npm package is now typstyle-core
, typstyle
on npm will be deprecated in the future.
- Fix:
// @typstyle off
not working in certain cases. See #182 - Feature: dot chain formatting is more smart now. We will only break dot chain into multiple lines if it is long enough or complex enough. For example, the following result is generated by typstyle previously:
#{
cetz
.draw
.group({
cetz.draw.translate(node.pos.xyz)
for (i, extrude) in node.extrude.enumerate() {
cetz
.draw
.set-style(
fill: if i == 0 { node.fill },
stroke: node.stroke,
)
(node.shape)(node, extrude)
}
})
}
Now it will be formatted as following. This is more readable and compact:
#{
cetz.draw.group({
cetz.draw.translate(node.pos.xyz)
for (i, extrude) in node.extrude.enumerate() {
cetz.draw.set-style(
fill: if i == 0 { node.fill },
stroke: node.stroke,
)
(node.shape)(node, extrude)
}
})
}
v0.12.10 - [2024-12-12]
- Fix: musl build is now statically linked. This fixes the issue that the musl build doesn't work on systems other than alpine.
- Typstyle now break content blocks into multiple lines if they have leading spaces and trailing spaces.
For example, the following code is not formattable by typstyle previously:
#{
let res = if true [ The Result is definitely true. And it is a very long sentence that needs to be broken into multiple lines. ] else [ The Result is definitely false. And it is a very long sentence that need...
Assets 18
v0.13.5
Compare
Changelog
v0.13.5 - [2025-05-07]
- Bug fix: Typstyle previously will panic if there is only a space in math function call. Now it is fixed.
- Bug fix: Typstyle previously will not converge if there are multiple newlines in a function call. Now it is fixed.
v0.13.4 - [2025-04-30]
-
Feature: typstyle cli now enables import sorting by default. You can disable it with
--no-reorder-import-items
flag. -
Feature: typstyle now supports
--wrap-text
flag to wrap texts in the markup. It is considered as experimental and may not work in all cases. Please report any issues you encounter.For example, this code:
Let's say you have a long text that needs to be wrapped in the markup. This is a very long sentence that needs to be wrapped in the markup. It should be wrapped in the markup.
Will be formatted as following when column width is 80 and
--wrap-text
is enabled:Let's say you have a long text that needs to be wrapped in the markup. This is a very long sentence that needs to be wrapped in the markup. It should be wrapped in the markup.
-
Feature: typstyle now tries to align
&
s in math equations, even if the cells are multiline. Currently it it works in most cases, except the following:- Has multiline
Str
orRaw
descendants. - Not following a linebreak when in
MathDelimited
orArgs
. - Across args of functions such as
cases
.
For example, this code:
$ F_n &= sum_(i=1)^n i^2 & n > 0 \ a &< b+1 & forall b < 1 $
Will be formatted as:
$ F_n & = sum_(i=1)^n i^2 & n > 0 \ a & < b+1 & forall b < 1 \ $
- Has multiline
-
Feature: typstyle now generate more compact result when formatting complex function calls. Similar to what rustfmt does, when the only argument is combinable, it will be put in the same line as the function call. When the last argument is blocky, it will also be put in the same line if possible.
For example, this code:
#figure( fletcher.diagram( node-outset: .5em, node-stroke: .075em, node( (+1,0,), [variable], radius: 3em, ), // test ))
Will be formatted as:
#figure(fletcher.diagram( node-outset: .5em, node-stroke: .075em, node((+1, 0), [variable], radius: 3em), // test ))
For another example, this code:
#set page( margin: 0.5in, footer: context { if counter(page).display() == "2" { [test] } else { [] } } )
Will be formatted as:
#set page(margin: 0.5in, footer: context { if counter(page).display() == "2" { [test] } else { [] } })
Due to the limitations of the currently used pretty engine, there is still room for improvement in some cases.
v0.13.3 - [2025-04-10]
- Feature: Unified equation layout and removed indent for non-block equations
- Non-block equations are no longer indented, which works well in most reasonable cases
- Nodes with multiline comments are now treated as multiline
- Improved comment attachment mechanism
- Fix: Improved handling of comments directly in equations and spaces in math
- Correctly handles in-equation comments before and after
Math
- Fixed infinite spaces added before
//
in math - Fixed extra indent of array args in math
- Optimized spaces handling in
MathAttach
andMathRoot
- Correctly handles in-equation comments before and after
- Fix: Addressed list layout issues
- Fixed indent and grouping issues in list layouts
- Fixed missing separators in list layouts mixed with comments
v0.13.2 - [2025-03-28]
- Feature: Typstyle can format code in markup lines now. Linebreaks are suppressed inside to ensure compact layout.
- Feature: Typstyle can format math equations with comments and hashes now. Previously they are skipped.
- Feature: Improved formatting of math delimited. Linebreaks are kept as is.
- Experimental feature: Typstyle CLI will sort import items in a single import statement if
--reorder-import-items
is passed. It would be enabled by default in the future. - Added a 3rd-party typstyle-action maintained by @grayespinoza.
v0.13.1 - [2025-03-20]
- Bump to typst v0.13.1
- Typstyle now uses braces ({}) instead of parens (()) when the closure body is not a chainable binary expression
#fun(() => {
aaa
})
instead of
#fun(() => (
aaa
))
- Fix mis-format when linebreak
\
appears at the end of a inline math equation. - Fix mis-format when line comment appears in a multiline
import
statement.
v0.13.0 - [2025-02-22]
- Bump to typst v0.13.0
- Regression: In typst v0.13.0, PR #5310 changes the parsing behavior of comments when it presenting in list, enum and term list. In this verison, the indent level of the comment in list, enum and term list determined by the next item, not the previous item. For example,
- Fruit
- Apple
- Banana
// - Orange
- Vegetable
- Carrot
- Tomato
will be formatted as this in this version. Note that the // - Orange
is misindented. It is indented to the same level as - Vegetable
. It works perfectly in previous versions. So if you want to keep the old behavior, please keep using typstyle v0.12.x at this moment.
- Fruit
- Apple
- Banana
// - Orange
- Vegetable
- Carrot
- Tomato
v0.12.15 - [2025-02-16]
- Feat: add
--tab-width
cli option to set the number of spaces for indentation. The default value is 2. - Fix: typstyle-cli now outputs the original source when the input syntax is erroneous.
- Fix: issues with list/enum/term item indent and linebreak with comments are fixed. Now linebreaks in items are preserved. Items in content blocks will be surrounded with linebreaks when necessary (also to avoid ambiguity).
For example, the code
+
+ xyz
-
xyz
- //foo
- xyz
//bar
/ 4:
// 4
/ 44: // 44
444
was incorrectly formatted to
+ + xyz
- xyz
- //foo
- xyz
//bar
/ 4: // 4
/ 44: // 44
444
Now it is correctly unchanged.
And
#{
[- single]
[- indented
- less
]
[- indented
- same
- then less
- then same
]
[- indented
- more
- then same
- then less
]
}
will be correctly formatted to
#{
[- single]
[
- indented
- less
]
[
- indented
- same
- then less
- then same
]
[
- indented
- more
- then same
- then less
]
}
v0.12.14 - [2024-12-27]
- Fix: typstyle-cli previously add an extra newline at the end of the file. Now it is fixed.
- Fix: typstyle now correctly strip leading spaces in markup
- Feat: typstyle-core now has very basic support for range formatting.
v0.12.13 - [2024-12-21]
- Fix: typstyle previously incorrectly remove comments in math equations. Now it is fixed.
- Cli:
- typstyle now reports error when the input file is invalid.
typstyle --check
no longer changes the file content.- Other minor improvements.
v0.12.12 - [2024-12-16]
No changes. We failed to publish the previous release because of the ci issue.
v0.12.11 - [2024-12-16]
Packaging: We've split typstyle crate into two independent crates: typstyle
and typstyle-core
. typstyle
is the CLI tool, and typstyle-core
is the core library. The npm package is now typstyle-core
, typstyle
on npm will be deprecated in the future.
- Fix:
// @typstyle off
not working in certain cases. See #182 - Feature: dot chain formatting is more smart now. We will only break dot chain into multiple lines if it is long enough or complex enough. For example, the following result is generated by typstyle previously:
#{
cetz
.draw
.group({
cetz.draw.translate(node.pos.xyz)
for (i, extrude) in node.extrude.enumerate() {
cetz
.draw
.set-style(
fill: if i == 0 { node.fill },
stroke: node.stroke,
)
(node.shape)(node, extrude)
}
})
}
Now it will be formatted as following. This is more readable and compact:
#{
cetz.draw.group({
cetz.draw.translate(node.pos.xyz)
for (i, extrude) in node.extrude.enumerate() {
cetz.draw.set-style(
fill: if i == 0 { node.fill },
stroke: node.stroke,
)
(node.shape)(node, extrude)
}
})
}
v0.12.10 - [2024-12-12]
- Fix: musl build is now statically linked. This fixes the issue that the musl build doesn't work on systems other than alpine.
- Typstyle now break content blocks into multiple lines if they have leading spaces and trailing spaces.
For example, the following code is not formattable by typstyle previously:
#{
let res = if true [ The Result is definitely true. And it is a very long sentence that needs to be broken into multiple lines. ] else [ The Result is definitely false. And it is a very long sentence that needs to be broken into multiple lines. ]
}
Now it will be formatted as:
#{
let res = if true [
The Result is definitely true. And it is a very long sentence that needs to be broken into multiple lines.
] else [
The Result is definitely false. And it is a very long sentence that needs to be broken into multiple lines.
]
}
v0.12.9 - [2024-12-08]
- Typstyle no longer force single arg function call to be in a single line. Instead, it is determined in a smarter way. And this fixes #143.
- Typstyle will always add newline at the end of the file. Previously, it only adds newline when it already exists.
v0.12.8 - [2024-12-07]
- Typstyle will format binary expressions as operator chains. Parentheses are added if necessary.
- Formatting chains with commen...