emmetio / emmet-eclipse

Emmet for Eclipse
http://emmet.io
342 stars 74 forks source link

Custom filters #46

Open mihai-vlc opened 9 years ago

mihai-vlc commented 9 years ago

Hello,

I was trying to play with some custom filters. I did manage to get this one working in sublime text 3

emmet.require('filter/main.js').add('php', function(tree) {
    tree.children.forEach(function(node) {
        // define variable name
        node.start = '\\$' + node.name();

        // define object keys
        var className = node.attribute('class');
        if (className) {
            node.start += className
                .split(' ')
                .map(function(c) {return "['" + c + "']";})
                .join('');
        }

        node.end = '';
    });
});

however it doesn't seem to work in eclipse. Is the error displayed somewhere (in sublime I had the console) ?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26070551-custom-filters?utm_campaign=plugin&utm_content=tracker%2F311127&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F311127&utm_medium=issues&utm_source=github).