Skip to content

Commit

Permalink
utils: support italics as well as bold
Browse files Browse the repository at this point in the history
Previously, we only supported bold in messages. Now, we support both
bold and italics.
  • Loading branch information
evanlucas committed Mar 14, 2017
1 parent 5c04a54 commit 26c8fb2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ exports.processMessage = function processMessage(msg, colors, conn, settings) {
// This sucks :/
const uc = settings.get('user.color')
const inlineImgs = settings.get('inline.images')
m = m.replace('\u0002', '<strong>').replace('\u0002', '</strong>')
m = m.replace(/\u0001([^\u0001]+)\u0001/g, '<em>$1</em>')
m = m.replace(/\u0002([^\u0002]+)\u0002/g, '<strong>$1</strong>')
for (const item of colors.entries()) {
const username = item[0]
const color = conn && uc && username === conn.nick
Expand Down

0 comments on commit 26c8fb2

Please sign in to comment.