Skip to content

Commit

Permalink
fix: escape underscores in Telegram message
Browse files Browse the repository at this point in the history
- Added escaping for underscore character '_' in the message format function.
- Updated README-RU.MD to use specific version tag 'v1' instead of branch name 'main'.
  • Loading branch information
proDreams committed Feb 10, 2025
1 parent afb670a commit c8bc183
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README-RU.MD
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Запуск действия уведомления в Telegram
uses: proDreams/actions-telegram-notifier@main
uses: proDreams/actions-telegram-notifier@v1
if: always()
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
Expand All @@ -61,7 +61,7 @@ jobs:

```yaml
- name: Запуск действия уведомления в Telegram
uses: proDreams/actions-telegram-notifier@main
uses: proDreams/actions-telegram-notifier@v1
if: always()
with:
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ fn escape_markdown_v2(text: &str) -> String {
.replace('}', "\\}")
.replace('.', "\\.")
.replace('!', "\\!")
.replace('_', "\\_")
}

#[tokio::main]
Expand Down

0 comments on commit c8bc183

Please sign in to comment.