Skip to content

Commit

Permalink
(fix) add italics
Browse files Browse the repository at this point in the history
  • Loading branch information
khalby786 committed Apr 5, 2024
1 parent 87047e0 commit 309b8a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slack-cms",
"version": "1.0.1",
"version": "1.0.2",
"description": "What if you could use a Slack channel as the CMS for your blog?",
"main": "lib/index.js",
"files": [
Expand Down
3 changes: 3 additions & 0 deletions src/helpers/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export async function parse(
// strike
mrdkwn = mrdkwn.replace(/\~(.*?)\~/g, "<strike>$1</strike>");

// italics
mrdkwn = mrdkwn.replace(/\_(.*?)\_/g, "<i>$1</i>");

// use slack-markdown to convert markdown to html
mrdkwn = toHTML(mrdkwn, options);

Expand Down

0 comments on commit 309b8a1

Please sign in to comment.