Browse Source

提交代码,修改Bug

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.4.1^2
zouap 3 years ago
parent
commit
9281749d32
2 changed files with 8 additions and 3 deletions
  1. +1
    -0
      models/dbsql/issue_foreigntable_for_es.sql
  2. +7
    -3
      routers/search.go

+ 1
- 0
models/dbsql/issue_foreigntable_for_es.sql View File

@@ -193,6 +193,7 @@ $def$
name=NEW.name,
is_closed=NEW.is_closed,
num_comments=NEW.num_comments,
updated_unix=NEW.updated_unix,
comment=(select array_to_string(array_agg(content order by created_unix desc),',') from public.comment where issue_id=NEW.id)
where id=NEW.id;
return new;


+ 7
- 3
routers/search.go View File

@@ -573,7 +573,8 @@ func trimFontHtml(text []rune) string {
startRune := rune('<')
endRune := rune('>')
count := 0
for i := 0; i < len(text); i++ {
i := 0
for ; i < len(text); i++ {
if text[i] == startRune { //start <
re := false
j := i + 1
@@ -592,11 +593,14 @@ func trimFontHtml(text []rune) string {
} else {
return string(text[0:i])
}

}
}
}
return string(text)
if count%2 == 1 {
return string(text[0:i]) + "</font>"
} else {
return string(text[0:i])
}
}

func trimHrefHtml(result string) string {


Loading…
Cancel
Save