Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in rendering when using non-ascii in string #6

Closed
Pluriscient opened this issue Apr 27, 2024 · 4 comments
Closed

Bug in rendering when using non-ascii in string #6

Pluriscient opened this issue Apr 27, 2024 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@Pluriscient
Copy link

Pluriscient commented Apr 27, 2024

When you pass non-ascii character into the format string, it either

Crashes when passed directly

#import "@preview/oxifmt:0.2.0": strfmt

#strfmt("Hello € {}", "man") // -> Character Boundary at 8

Invalidly renders

#import "@preview/oxifmt:0.2.0": strfmt
#let c = yaml("content.yaml")
#strfmt(c.working, company-bank-name: "FAKE", company-bank-iban: "Broken stuff") \
#strfmt(c.broken, company-bank-name: "FAKE", company-bank-iban: "Broken stuff")

with content.yaml

working: "Bank: {company-bank-name} - IBAN: {company-bank-iban}"
broken: "Bank: {company-bank-name} € IBAN: {company-bank-iban}"

Rendering
image

Minimal repro's

@PgBiel PgBiel added the bug Something isn't working label Apr 27, 2024
@PgBiel
Copy link
Owner

PgBiel commented Apr 27, 2024

Thanks for reporting, this seems bad. I'll take a look.

@PgBiel
Copy link
Owner

PgBiel commented Apr 27, 2024

Hi, I believe this should be fixed after 13f9bed. Can you give it a try in your project and let me know if it's working? Thanks!

@PgBiel PgBiel closed this as completed May 5, 2024
@PgBiel PgBiel added this to the 0.2.1 milestone May 5, 2024
@Pluriscient
Copy link
Author

Hi,

Missed the notifications, apologies. Checked now and it works!
Thanks for the work :)

@PgBiel
Copy link
Owner

PgBiel commented May 6, 2024

Great, thank you for checking! And you're welcome! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants