jiphy icon indicating copy to clipboard operation
jiphy copied to clipboard

wrong block groupings

Open fabiommendes opened this issue 8 years ago • 0 comments

Jiphy does not group code blocks correctly when going from python to js. The newline to close a block seems silly to me:

if x:
    line_of_code()
    this_is_in_the_same_js_block()

    this_is_not()
i_am_scoped_with_the_previous_line()

You might preserve the same lines in js by closing the block in its last line

if (x){
    line_of_code();
    this_is_in_the_same_js_block();

    this_is_not();}
i_am_scoped_with_the_previous_line();

Python tokenizer takes care of indents, show it should not be so difficult to break the blocks like this

fabiommendes avatar Apr 08 '16 00:04 fabiommendes