How do I add a hanging indent to long sub-entries in an index?

I am using in-dexter to create an index. Some index entries have sub-entries, and some of these sub-entries are long. When printed in the index, the sub-entry’s line wraps around, sitting flush left, like so:

I would like for the wrapped-around bit to be indented slightly to the right of the beginning of the line:

Might someone advise on how this might be achieved? Here is a MWE:

#import "@preview/in-dexter:0.7.0": *

This is an example of the hanging-indent#index("Hanging indent", "a longer line that will wrap around on to a new line")  problem in the index.

#columns(2)[ 
  #make-index(
    title: "Index",
  )
]

The problem here is that [] scope is used (in the package) for adding things, which is bad unless you know of all the consequences (additional spaces/paragraphs almost everywhere).

Changing

  let rendered-pages = [
    #let p = pages.map(render-function)
    #box(width: lvl * 1em)#apply-entry-casing(
      display,
      entry-casing,
      entry.at("apply-casing", default: auto),
    )#box(width: 1fr)#p.join(", ") \
  ]

to

  let rendered-pages = {
    let p = pages.map(render-function)
    box(width: lvl * 1em)
    apply-entry-casing(
      display,
      entry-casing,
      entry.at("apply-casing", default: auto),
    )
    box(width: 1fr)
    p.join(", ")
    parbreak()
  }

plus

#import "@preview/in-dexter:0.7.0" as in-dexter: *

#let make-index(..args) = {
  set par(first-line-indent: 0pt, spacing: 0.65em, hanging-indent: 2em)
  in-dexter.make-index(..args)
}

and you get a hanging indent:

#import "@preview/in-dexter:0.7.0" as in-dexter: *

#let make-index(..args) = {
  set par(first-line-indent: 0pt, spacing: 0.65em, hanging-indent: 2em)
  in-dexter.make-index(..args)
}

This is an example of the hanging-indent#index("Hanging indent", "a longer line that will wrap around on to a new line") problem in the index.

This is an example of the hanging-indent#index("Hanging indet", "a longer ine that will wrap around on to a new line") problem in the index.

#columns(2)[
  #make-index(title: "Index")
]

Not sure how it supposed to look like in all cases or at all, but seems good. The second issue is linebreak instead of parbreak, at least if you need the hanging-indent.

https://typst.app/docs/reference/model/par/#what-becomes-a-paragraph

You can ask the author to change it, and then you would be able to just use set par rule outside.