Created
November 9, 2012 13:24
-
-
Save zavakid/4045648 to your computer and use it in GitHub Desktop.
liquid tokenize
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
text = "{{asd}} sdfadsf afas {% a %}xxx{% enda %} asdfa asdf s af " | |
text.split(Liquid::TemplateParser) | |
# result: | |
[ | |
"", | |
"{{asd}}", | |
" sdfadsf afas ", | |
"{% a %}", | |
"xxx", | |
"{% enda %}", | |
" asdfa asdf s af " | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment