typstfmt
typstfmt copied to clipboard
[bug] New indent is added to ignored code block on each run (of formatting)
Before formatting
#let template(doc) = {
//typstfmt::off
show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
doc
}
#let template(doc) = [
//typstfmt::off
#show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
#doc
]
#let template(doc) = [
//typstfmt::off
#show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
#doc
]
After 1st run
#let template(doc) = {
//typstfmt::off
show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
doc
}
#let template(doc) = [
//typstfmt::off
#show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
#doc
]
#let template(doc) = [
//typstfmt::off
#show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
#doc
]
After 10th run
#let template(doc) = {
//typstfmt::off
show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
doc
}
#let template(doc) = [
//typstfmt::off
#show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
#doc
]
#let template(doc) = [
//typstfmt::off
#show figure.where(kind: table): it => align(center)[
#it.body
]
//typstfmt::on
// END ======================================================================
#doc
]
Smaller examples:
#let template(doc) = {
//typstfmt::off
let a = ""
//typstfmt::on
// END ======================================================================
doc
}
#let template(doc) = {
let a = ""
//typstfmt::off
//typstfmt::on
// END ======================================================================
doc
}
Config:
ident_space = 2
max_line_length = 80
experimental_args_breaking_consecutive = false
Version: https://github.com/astrale-sharp/typstfmt/commit/578d39fb304020d0c26118e4eeab272868c9d525