MCPcopy Index your code
hub / github.com/NodeBB/nodebb-plugin-markdown / execute

Function execute

index.js:188–197  ·  view source on GitHub ↗
(html)

Source from the content-addressed store, hash-verified

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);

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…