pocka / slack-message-parser

Parser for Slack message format

Home Page:https://pocka.github.io/slack-message-parser/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bold parser missing some cases with punctuation after the bold text

kbhomes opened this issue · comments

The following message, when sent to Slack, renders bold text for the Y's and normal text for the N's.

*Y*~ *N*` *Y*! *N*@ *Y*# *Y*$ *Y*% *Y*^ *N*& *N** *N*( *Y*) *N*_ *Y*- *Y*+ *Y*= *Y*{ *Y*} *Y*[ *Y*] *N*| *N*\ *Y*; *Y*: *Y*' *Y*" *N*< *Y*, *N*> *Y*. *Y*? *Y*/ *Y*

However, slack-message-parser misses a lot of these cases, but also has a false-positive match in *N** (should not be formatted as bold according to my test in Block Kit Builder).

I put this test string up on CodePen to see what gets currently formatted: https://codepen.io/kbhomes/pen/WNzLbem