Skip to content

Commit

Permalink
Fix for issues in #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddfawcett committed Nov 19, 2016
1 parent cdc6238 commit e7cf964
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Notepad/Element.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public enum Element: String {

case body = ".*"

case bold = "\\**(?:^|[^*])(\\*\\*(\\w+(\\s\\w+)*)\\*\\*)"
case italic = "\\**(?:^|[^*])(\\*(\\w+(\\s\\w+)*)\\*)"
case bold = "(^|[\\W_])(?:(?!\\1)|(?=^))(\\*|_)\\2(?=\\S)(.*?\\S)\\2\\2(?!\\2)(?=[\\W_]|$)"
case italic = "(^|[\\W_])(?:(?!\\1)|(?=^))(\\*|_)(?=\\S)((?:(?!\\2).)*?\\S)\\2(?!\\2)(?=[\\W_]|$)"
case boldItalic = "(\\*\\*\\*\\w+(\\s\\w+)*\\*\\*\\*)"
case code = "(`\\w+(\\s\\w+)*`)"

Expand Down

0 comments on commit e7cf964

Please sign in to comment.