Stroke parsing error in stroke-len()
igt-fred opened this issue · 4 comments
igt-fred commented
Hello and first thenk you for this very useful package.
Sorry for the title, I did not find a better one.
Just wanted to mention a small error on one of my table (nothing special really):
error: cannot access fields on type none
┌─ \tablex.typ:456:38
│
456 │ s = repr(stroke).match(r).captures.first()
│ ^^^^^^^^
Nothing blocking, I just bypassed it with something like:
455 let r = regex("thickness: (\\d+(?:em|pt|cm|in|%))")
456 s = repr(stroke).match(r).captures.first()
-----
455 let r = regex("thickness: (\\d+(?:em|pt|cm|in|%))")
456 let xx = repr(stroke).match(r)
457 if xx != none { s = xx.captures.first() }
But as I am new to Typst, I prefer to let you fix it properly ;)
Hope it helps...
PgBiel commented
ah crap, I screwed up while fixing #49 lol
thanks for reporting! I'll release 0.0.6 soon with a hotfix (and perhaps other fixes if possible)
(your fix is reasonable btw)
PgBiel commented
If you don't mind, can you please specify which stroke type you used? For testing
igt-fred commented
Sure, I simplified my example to the minimum throwing the error:
#let risks = ( (id: 1, desc: "Bla bla bla"), (id: 2, desc: "tutututu") )
#let riskContent = for risk in risks { ([#risk.id], [#risk.desc]) }
#tablex(columns: 2, align: (center, left), stroke: 0.4pt + black, inset: 4pt, ..riskContent)
PgBiel commented
Thank you!