Esempio n. 1
0
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()
Esempio n. 2
0
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()	
Esempio n. 3
0
    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
Esempio n. 4
0
 def _preprocess(self, source, name, filename=None):
     parser = Parser(source, filename=filename)
     block = parser.parse()
     compiler = Compiler(block)
     return compiler.compile().strip()
Esempio n. 5
0
 def _preprocess(self, source, name, filename=None):
     parser = Parser(source,filename=filename)
     block = parser.parse()
     compiler = Compiler(block)
     return compiler.compile().strip()