issue引用渲染时替换所有

This commit is contained in:
caishi 2023-04-26 14:26:12 +08:00
parent eb1434c351
commit b2ed552ad2
1 changed files with 2 additions and 2 deletions

View File

@ -72,10 +72,10 @@ export default ({
let filter = issues.filter(f=>f.project_issues_index.toString() === index); let filter = issues.filter(f=>f.project_issues_index.toString() === index);
if(filter && filter.length === 1){ if(filter && filter.length === 1){
let content = `#${index}:${filter[0].subject}`; let content = `#${index}:${filter[0].subject}`;
rs = rs.replace(`#${index}`,content); rs = rs.replaceAll(`#${index}`,content);
}else{ }else{
let content = `<span>#${index}(已删除)</span>`; let content = `<span>#${index}(已删除)</span>`;
rs = rs.replace(`<a href="`+`/${owner}/${projectsId}/issues/${index}`+`">#${index}</a>`,content); rs = rs.replaceAll(`<a href="`+`/${owner}/${projectsId}/issues/${index}`+`">#${index}</a>`,content);
} }
} }
} }