Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 2654964250
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (9 sloc) 0.538 kB
def extract_haml(fileobj, keywords, comment_tags, options):
""" babel translation token extract function for haml files """
import haml
from mako import lexer, parsetree
from mako.ext.babelplugin import extract_nodes
encoding = options.get('input_encoding', options.get('encoding', None))
template_node = lexer.Lexer(haml.preprocessor(, input_encoding=encoding).parse()
for extracted in extract_nodes(template_node.get_children(), keywords, comment_tags, options):
yield extracted
Jump to Line
Something went wrong with that request. Please try again.