puppetlabs / puppet-syntax-emacs

Puppet language syntax highlighting for Emacs
Other
25 stars 17 forks source link

The indenting fails when e.g. "[" is contained within a string #16

Open avar opened 8 years ago

avar commented 8 years ago

Result of M-x indent-region on this code:

class whatever {
    file {
        content=> "[";
                    }
                    }

I think the problem's obvious, those trailing } shouldn't be indented according to some string content. Similarly:

class whatever {
    file {
        content=> "{",
            mode => '0755',
        }
    }

Here it gets confused because the string has a "{" and decides to indent the next key in the block according to that.