(html)
| 186 | const italicMention = /@<em>([^<]+)<\/em>/g; |
| 187 | const boldMention = /@<strong>([^<]+)<\/strong>/g; |
| 188 | const execute = function (html) { |
| 189 | // Replace all italicised mentions back to regular mentions |
| 190 | if (italicMention.test(html)) { |
| 191 | html = html.replace(italicMention, (match, slug) => `@_${slug}_`); |
| 192 | } else if (boldMention.test(html)) { |
| 193 | html = html.replace(boldMention, (match, slug) => `@__${slug}__`); |
| 194 | } |
| 195 | |
| 196 | return html; |
| 197 | }; |
| 198 | |
| 199 | if (payload.hasOwnProperty('postData')) { |
| 200 | payload.postData.content = execute(payload.postData.content); |
no outgoing calls
no test coverage detected
searching dependent graphs…