def preprocessor(source): # if name and not os.path.splitext(name)[1] in self.environment.jade_file_extensions: # return source name = None parser = Parser(source, filename=name) block = parser.parse() compiler = Compiler(block) return compiler.compile().strip()
def preprocessor(source): # if name and not os.path.splitext(name)[1] in self.environment.jade_file_extensions: # return source name = None parser = Parser(source,filename=name) block = parser.parse() compiler = Compiler(block) return compiler.compile().strip()
def preprocess(self, source, name, filename=None): if name and not os.path.splitext(name)[1] in self.environment.jade_file_extensions: return source parser = Parser(source,filename=name) block = parser.parse() compiler = Compiler(block) return compiler.compile() # procesed= process(source,name) # print procesed # return procesed
def _preprocess(self, source, name, filename=None): parser = Parser(source, filename=filename) block = parser.parse() compiler = Compiler(block) return compiler.compile().strip()
def _preprocess(self, source, name, filename=None): parser = Parser(source,filename=filename) block = parser.parse() compiler = Compiler(block) return compiler.compile().strip()