chrisglein / artificial-chat

2 stars 1 forks source link

CodeBlock newlines display as ellipses (...) #68

Closed chrisglein closed 1 year ago

chrisglein commented 1 year ago

image

I've attempted to walk through the code in the syntax highlighter on this: https://github.com/conorhastings/react-native-syntax-highlighter/blob/master/src/index.js#L102 I'm not familiar with the code. Seems like text elements come through in some tokenized fashion, but so do <span> elements, derived from how this worked as a web module. I don't know where the mapping of \n to ... is happening.

It's all a light adaptation of https://github.com/react-syntax-highlighter/react-syntax-highlighter, which in turn uses https://prismjs.com/.

chrisglein commented 1 year ago

Interesting. If I look at this in the XAML property view image image

Walking the Inlines collections: image image

This is certainly curious: image

And if I turn that off (TextTrimming = None), then the ellipses go away.

chrisglein commented 1 year ago

Believe this is driven by ellipsizemode and then gets applied in SetTextTrimming