Skip to content

Commit

Permalink
docs: include rubular links for link formatter regex
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenosloan committed Sep 30, 2015
1 parent 0b036cf commit a3fb574
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/slack-notifier/link_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ def slack_link link, text=nil
return out
end

# http://rubular.com/r/19cNXW5qbH
def html_pattern
/ <a (?:.*?) href=['"](.+?)['"] (?:.*?)> (.+?) <\/a> /x
end

# http://rubular.com/r/fLEdmTSghW
def markdown_pattern
/\[([^\[\]]*?)\]\((https?:\/\/.*?)\)/
/\[ ([^\[\]]*?) \] \( (https?:\/\/.*?) \) /x
end

end
Expand Down

0 comments on commit a3fb574

Please sign in to comment.