The underscores aren't being parsed as italic markup because you're passing a string (in quotes), not content (in square brackets).
In Typst, "From Away" is a string literal — the underscores are just literal characters, like any other text in a string. Typst's markup syntax (... for italics, ... for bold, etc.) only gets parsed when you're in markup/content mode, not inside a quoted string.
Fix: use square brackets instead of quotes:
typst
#highlight_box[From Away—Native Mainers' term describing anyone born outside the state of Maine.]
That passes actual content to your function, so the underscores are interpreted as markup and render italic.
If you ever do need italics from a string value (e.g. it's stored as a variable), you'd need #emph(the_string) instead, since string markup won't auto-parse:
typst
#highlight_box(emph("From Away—Native Mainers' term..."))
But for a literal string like this, switching "..." → [...] is the simplest fix.
The underscores aren't being parsed as italic markup because you're passing a string (in quotes), not content (in square brackets).
In Typst, "From Away" is a string literal — the underscores are just literal characters, like any other text in a string. Typst's markup syntax (... for italics, ... for bold, etc.) only gets parsed when you're in markup/content mode, not inside a quoted string.
Fix: use square brackets instead of quotes:
typst
#highlight_box[From Away—Native Mainers' term describing anyone born outside the state of Maine.]
That passes actual content to your function, so the underscores are interpreted as markup and render italic.
If you ever do need italics from a string value (e.g. it's stored as a variable), you'd need #emph(the_string) instead, since string markup won't auto-parse:
typst
#highlight_box(emph("From Away—Native Mainers' term..."))
But for a literal string like this, switching "..." → [...] is the simplest fix.