Skip to content

panic when using new Indent option #73

@mmindenhall

Description

@mmindenhall

I just updated my vendored version of ace to the latest commit, and tried out the Indent option. For my site, I saw a panic when using the option due to a nil action.parent attribute. Adding a nil check as follows fixed this for me locally:

action.go:33:

func (e *action) IsBlockElement() bool {
    if e.parent != nil {
        return e.parent.IsBlockElement()
    }
    return false
}

I'm not sure whether the default should be to return true instead when the parent is nil, but this solved the issue for me at hand, which was the panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions