-
-
Save anonymous/4f6d4ff6966feb2372b5 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
# We do not allow '#' in tags. Aside from that, we will pretty much | |
# allow anything. For now, just keep things simple. | |
# raw: string to be parsed in tags | |
# returns a list of filtered tags | |
def parse_tags(raw) | |
tags = raw.split('#') | |
tags.reject! {|v| v.empty? } | |
tags.map! {|v| v.strip().downcase() } | |
tags.uniq! | |
tags | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment