Skip to content

Commit

Permalink
fix(markdown): replace not only first bad char
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo committed Jan 8, 2020
1 parent 70938a3 commit fc02923
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ function escape(text: string): string {
}

function bold(text: string): string {
return `*${text.replace(/\*/, '')}*`
return `*${text.replace(/\*/g, '')}*`
}

function italic(text: string): string {
return `_${text.replace(/_/, '')}_`
return `_${text.replace(/_/g, '')}_`
}

function monospace(text: string): string {
Expand Down

0 comments on commit fc02923

Please sign in to comment.