cchat/text
diamondburned 1dd36e0034 Clarified text.Imager's bound behavior
This commit clarifies text.Imager's (and therefore text.Avatarer's as
well) bound behaviors. Prior to this commit, it is unclear which end
bound an implementation should return. This commit clarifies that in
order for the image to be inlined, the start must overlap the end
bounds.

This clarification was needed in order to differentiate images to be
inlined with images to be associated with other contexts, such as
Mentioned. The inline check would therefore be very simple:

    if start == end {
        if imager := segment.AsImager(); imager != nil {
            log.Println("Segment has an inline image.")
        }
    }

Note that since there's now a way to explicitly define whether an image
is inlined or not, for implementations that can't display images, the
ImageText() should only be used if the image is actually inlined.
Therefore, the same check also applies to ImageText(). This also applies
to AvatarText().
2020-10-13 18:30:21 -07:00
..
text.go Clarified text.Imager's bound behavior 2020-10-13 18:30:21 -07:00
text_extras.go Fix text.SolidColor returning invalid color 2020-10-13 16:46:18 -07:00