caronc / apprise

Apprise - Push Notifications that work with just about every platform!
https://hub.docker.com/r/caronc/apprise
BSD 2-Clause "Simplified" License
10.9k stars 384 forks source link

Fix Markdown parsing for Telegram #1101

Closed luckydonald closed 2 months ago

luckydonald commented 2 months ago

See https://github.com/caronc/apprise/issues/740#issuecomment-2045907365, fixes #740.

Description:

Related issue (if applicable): #740

Markdown (v1) has bugs and is superseded by MarkdownV2.

Checklist

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@<this.branch-name>

# Test out the changes with the following command:
apprise -t "Test Title" -b "Test Message" \
  <apprise url related to ticket>
caronc commented 2 months ago

Added new varible ?mdv= which can optionally be set on the telegram:// Apprise URL supporting both v1 and v2, but defaulting to v2 going forward (thanks to this PR).

Probably a bit of overkill, but for those who might be expecting a specific look and feel, they'll be able to at least fall back to that, otherwise it leverages the new version (2).

Thank you very much for this PR!! :rocket: :+1: