Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Souren committed Mar 21, 2013
1 parent c87bb29 commit b3a198e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions meteor/client/parser.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ articleParse = (text) ->

text = text.replace /^\#/gm, '<li>'

# ditch images
# Ditch images
text = text.replace /\[\[(File|Image):(.+?)\|(.+?)\]\]/g, ''

# don't match [[link|text]]
text = text.replace /\[\[([^|]+?)\]\]/g, '<a href="#$1" class="mw-redirect">$1</a>'
# Don't match [[link|text]]
text = text.replace /\[\[([^|]+?)\]\]/g, '<a href="#$1">$1</a>'

# and now match [[link|text]]
text = text.replace /\[\[(.+?)\|(.+?)\]\]/g, '<a href="#$1" class="mw-redirect">$2</a>'
text = text.replace /\[\[(.+?)\|(.+?)\]\]/g, '<a href="#$1">$2</a>'

# hyperlinks
text = text.replace /\[(.+?) (.+?)\]/g, '<a href="$1">$2</a>'
# Hyperlinks
text = text.replace /\[(.+?) (.+?)\]/g, '<a class="external" href="$1">$2</a>'

# bold
text = text.replace /\'\'\'(.*?)\'\'\'/g, '<strong>$1</strong>'
Expand Down

0 comments on commit b3a198e

Please sign in to comment.