Open 1504168 opened 10 months ago
Repro'd online; removing the :
colon formats the resulting code as expected - the indenter is probably getting confused with line labels... if I recall there's some regex-matching involved, in which case the fix for this is probably just a few characters in a regex pattern.
The plan for RD3 is to leverage parse trees for code formatting (we've talked about rewriting the indenter to do this, for years!), so this kind of problems pretty much solve themselves, because our parser has no problem telling a comment from a line label.
Thank you.
Rubberduck version information The info below can be copy-paste-completed from the first lines of Rubberduck's log or the About box:
Version 2.5.9.6289 OS: Microsoft Windows NT 10.0.19045.0, x64 Host Product: Microsoft Office x64 Host Version: 16.0.17231.20008 Host Executable: EXCEL.EXE
Description Indenting is failing on the below line of code.
It failed if I got rid of the @ from the comment as well. It successfully indent if I don't put any space after @PossibleError from the comment line.
Expected behavior Expected indentation: