Fix constructor comments such that it does not concatenate return comment
This commit is contained in:
7
class.go
7
class.go
@@ -185,10 +185,9 @@ func getConstructors(doc *goquery.Document) ([]Constructor, error) {
|
||||
resConstructor.Params[i].Comment = parameterDescription
|
||||
})
|
||||
|
||||
constructorBlock.Find(":not(function)").Children().Each(func(i int, s *goquery.Selection) {
|
||||
if s.Is("p") {
|
||||
resConstructor.Comment = strings.TrimSpace(s.Text())
|
||||
}
|
||||
constructorBlock.Find("div:not(.function):not(.indented) > p:not(:has(*))").Each(func(i int, s *goquery.Selection) {
|
||||
resConstructor.Comment += strings.TrimSpace(s.Text()) + "\n"
|
||||
resConstructor.Comment = strings.TrimSpace(resConstructor.Comment)
|
||||
})
|
||||
|
||||
spew.Dump(resConstructor)
|
||||
|
||||
Reference in New Issue
Block a user