unexpectedjs / unexpected-markdown

Unexpected flavored markdown
MIT License
2 stars 1 forks source link

WIP #11

Open Munter opened 8 years ago

Munter commented 8 years ago

Rewrite code snippets like this:

let a = 123;
if (fullMoon()) {
    var c = 987;
    let d = 666;
}
(function () {
    var b = 456;
}());
return new Promise(...);

=>

var a;
var c;
return (function () {
    a = 123;
    if (fullMoon()) {
        c = 987;
        let d = 666;
    }
    (function () {
        var b = 456;
    }());
    return new Promise(...);
}());
papandreou commented 8 years ago

@sunesimonsen Implemented as a utility function here: https://github.com/unexpectedjs/unexpected-markdown/commit/1b38593d0a10548dfb2d0dc505d3651e1cfb156b

sunesimonsen commented 8 years ago

@papandreou that is awesome - thanks!