Created
August 19, 2014 16:52
-
-
Save anonymous/6a6e5e96fba4f2579316 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RE_REDMINE_LINKS = %r{([\s\(,\-\[\>]|^)(!)?(([a-z0-9\-_]+):)?(attachment|document|version|forum|news|message|project|commit|source|export)?(((#)|((([a-z0-9\-_]+)\|)?(r)))((\d+)((#note)?-(\d+))?)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]][^A-Za-z0-9_/])|,|\s|\]|<|$)} | |
def redmine_links_match(text) | |
@redmine_links_match ||= {} | |
@redmine_links_match[text] ||= RE_REDMINE_LINKS.match(text) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment