Here's an XKCD comic:
...and some bold, italic, and underlined text.
Here's some Python code:
@classmethod
def parse(cls, msg):
"""Parse a message looking for embedded inline images"""
renderables = []
img = False
for block in img_match.split(msg):
if img:
renderables.append(InlineImage(block))
elif block:
if block[:1] == '\n':
block = block[1:]
if block[-1:] == '\n':
block = block[:-1]
renderables.append(block)
img = not img
return cls(renderables)