How can I determine the line num and char position of my tag in a liquid template? -
i have custom liquid tag. inside of tag, i'd know specific line number , character position of tag itself, in original template file.
i see tag has access tokens constructor. tokens array of lines follow closing tag in file. interesting, not i'm looking for.
any ideas or tips?
thanks!
you didn't parser using, first step in official parser tokenize entire template array of strings1, losing file coordinates in process. think (and i) out of luck without revamping parser.
1 https://github.com/shopify/liquid/blob/master/lib/liquid/template.rb#l166
Comments
Post a Comment