ptbtest.entityparser module

This module provides a helperclass to transform marked_up messages to plaintext with entities

class ptbtest.entityparser.EntityParser

Placeholder class for the static parser methods

static parse_html(message)
Parameters:message (str) – Message with HTML text to be transformed
Returns:The entities found in the message and the message after parsing.
Return type:(message(str), entities(list(telegram.MessageEntity)))
static parse_markdown(message)
Parameters:message (str) – Message with Markdown text to be transformed
Returns:The entities found in the message and the message after parsing.
Return type:(message(str), entities(list(telegram.MessageEntity)))