I want to slice up [Helloworld]
into sequence([Hello],[world])
I’m writing a plugin and my current approach is to use something like this:
for value in foo.text {
result.push([#value])
}
which would slice the content up into individual character wide contents (or into two chunks, etc.). The issue I have with this is that taking the text string and reconverting it back to content seems to loose the location property and I want people to be able to click on the text and it brings them back to the original source where they wrote it. I thought about something like this:
#let test = [Helloworld]
#let split-example(body) = {
{
show "world": ""
body
}
{
show "Hello":""
body
}
}
#split-example(test)
this would effectively achieve the same result visually, but is kind of hacky and I wouldn’t want to do this on a larger scale.