|
@@ -1812,7 +1812,6 @@ func ArticleAnnotation(item *models.HomeArticle) (annotation string) {
|
|
|
} else {
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
bodyText, _ := GetReportContentTextSubNew(annotation)
|
|
|
if bodyText == "" {
|
|
|
return
|
|
@@ -1826,6 +1825,7 @@ func ArticleAnnotation(item *models.HomeArticle) (annotation string) {
|
|
|
p := doc.Find("p")
|
|
|
p.Each(func(tk int, pd *goquery.Selection) {
|
|
|
pdText := pd.Text()
|
|
|
+ pdText = strings.Replace(pdText, " ", "", -1)
|
|
|
if pdText != "" {
|
|
|
textLen := strings.Index(docText, pdText)
|
|
|
mapDoc[(strings.Index(docText, pdText))] = pdText
|
|
@@ -1835,12 +1835,24 @@ func ArticleAnnotation(item *models.HomeArticle) (annotation string) {
|
|
|
li := doc.Find("li")
|
|
|
li.Each(func(tk int, li *goquery.Selection) {
|
|
|
liText := li.Text()
|
|
|
+ liText = strings.Replace(liText, " ", "", -1)
|
|
|
if liText != "" {
|
|
|
textLen := strings.Index(docText, liText)
|
|
|
mapDoc[(strings.Index(docText, liText))] = strconv.Itoa(tk+1) + "." + liText
|
|
|
mapSort = append(mapSort, textLen)
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+ ul := doc.Find("ul")
|
|
|
+ ul.Each(func(tk int, ul *goquery.Selection) {
|
|
|
+ ulText := ul.Text()
|
|
|
+ ulText = strings.Replace(ulText, " ", "", -1)
|
|
|
+ if ulText != "" {
|
|
|
+ textLen := strings.Index(docText, ulText)
|
|
|
+ mapDoc[(strings.Index(docText, ulText))] = strconv.Itoa(tk+1) + "." + ulText
|
|
|
+ mapSort = append(mapSort, textLen)
|
|
|
+ }
|
|
|
+ })
|
|
|
if len(mapSort) == 0 {
|
|
|
return
|
|
|
} else {
|