astrale-sharp / typstfmt

Apache License 2.0
253 stars 25 forks source link

Problematic snippet #31

Closed ondohotola closed 1 year ago

ondohotola commented 1 year ago

I use RCS and witht he following snippet can put the version number into a variable

#let revision = "$Revision: 3.35 $".trim(regex("\D"))

When run through the formatter it becomes

#let revision = "$Revision: 3.35 $".trim(
    ,regex(
        "\D",
    )
)

which generates the error

error: unexpected comma
  ┌─ new.typ:9:4
  │
9 │     ,regex(
  │     ^
bertin0 commented 1 year ago

duplicate of #18

astrale-sharp commented 1 year ago

fixed on master (with other problems tho :/ )