parinfer / parinfer.js

Let's simplify the way we write Lisp
https://shaunlebron.github.io/parinfer
MIT License
1.75k stars 40 forks source link

parenTrails empty after clamp #166

Closed shaunlebron closed 7 years ago

shaunlebron commented 7 years ago

the paren trail clamped by the cursor is not remembered below, (i.e. parenTrails is empty).

I think it has something to do with onIndent not being called at the end since parenStack is empty at a.

const code = `
(foo)|
a
`;

const {text, options} = parinferTest.parseInput(code);
options.returnParens = true;

const result = parinfer.smartMode(text, options);

console.log(JSON.stringify(result, null, 2));
oakmac commented 7 years ago

Where is the test case for this?