diff --git a/.gitignore b/.gitignore index 8d5c756d..c91c36d4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .idea/ -dist/ \ No newline at end of file +dist/ +GOPATH/ +cf/ \ No newline at end of file diff --git a/.idea/cf-tool.iml b/.idea/cf-tool.iml index 5e764c4f..bd89a7a1 100644 --- a/.idea/cf-tool.iml +++ b/.idea/cf-tool.iml @@ -2,7 +2,9 @@ - + + + diff --git a/client/parse.go b/client/parse.go index db6215f4..a484854e 100644 --- a/client/parse.go +++ b/client/parse.go @@ -19,8 +19,9 @@ func findSample(body []byte) (input [][]byte, output [][]byte, err error) { // For each item found, get the title inputCase := "" s.Find("pre").Contents().Each(func(_ int, s1 *goquery.Selection) { - //fmt.Println(s1.Text()) - inputCase += s1.Text() + "\n" + if !s1.Is("br") { + inputCase += s1.Text() + "\n" + } }) for strings.HasSuffix(inputCase, "\n\n") { inputCase = inputCase[:len(inputCase)-1] @@ -31,8 +32,9 @@ func findSample(body []byte) (input [][]byte, output [][]byte, err error) { // For each item found, get the title outputCase := "" s.Find("pre").Contents().Each(func(_ int, s1 *goquery.Selection) { - //fmt.Println(s1.Text()) - outputCase += s1.Text() + "\n" + if !s1.Is("br") { + outputCase += s1.Text() + "\n" + } }) for strings.HasSuffix(outputCase, "\n\n") { outputCase = outputCase[:len(outputCase)-1]