How to wrap the "Kannada" texts in table?

As reference to a post to handle text wrapping ,

show table.cell.where(x: 2): cell => {
  show regex("\b.+?\b"): it => it.text.codepoints().join(sym.zws)
  cell
}

but this will splits both consonants and vowels.

So i have tried the custom regex to handle for kannada fonts,

#show table.cell: cell => [
  #show regex("[\u0C95-\u0CB9][\u0C80-\u0C83\u0CBE-\u0CD6&&[^\u0CCD]]+|[\u0C95-\u0CB9]([\u0C80-\u0C83\u0CBE-\u0CD6][\u0C95-\u0CB9])*[\u0C80-\u0C83\u0CBE-\u0CD6&&[^\u0CCD]]+") : it => it.text.replace(it.text, it.text + sym.zws)
  #cell
]

but this will up to an extent, after that it will throw the error as
‘maximum show rule depth exceeded’.
how to solve this?

Hi there! Can you include a minimally reproducible example that causes the error you’ve mentioned? It sounds like the show rule might be applied recursively, but I’m not sure.

3 Likes

@Rajat_Hegde, hello. If you are new to posting code, please read How to post in the Questions category.