Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic - tree has lost its integrity #2

Open
vmihailenco opened this issue May 23, 2013 · 1 comment
Open

Panic - tree has lost its integrity #2

vmihailenco opened this issue May 23, 2013 · 1 comment
Assignees

Comments

@vmihailenco
Copy link

I am getting

Panic - tree has lost its integrity

when run following program:

package main

import (
    "fmt"
    "log"

    "github.com/JalfResi/GoTidy"
)

func main() {
    t := tidy.New()
    defer t.Free()

    t.InputXml(true)
    t.OutputXml(true)
    t.AddXmlDecl(true) // Without this option everything is OK.

    output, err := t.Tidy("test")
    if err != nil {
        log.Fatal(err, output)
    }
    fmt.Println(output)
}

I guess this is libtidy issue, but probably you can change Go program to not exit when libtidy can't parse XML.

@JalfResi
Copy link
Owner

Wow! That's a doozy! I'll look into this and try and fix this so that it doesn't panic.

@ghost ghost assigned JalfResi May 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants