Confluence add tag to replaced names (#852)

This commit is contained in:
Yuhong Sun 2023-12-21 18:03:56 -08:00 committed by GitHub
parent 4d950aa60d
commit 2f001c23b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,8 @@ def parse_html_page(text: str, confluence_client: Confluence) -> str:
if "ri:account-id" in user.attrs
else user.attrs["ri:userkey"]
)
user.replaceWith(_get_user(user_id, confluence_client))
# Include @ sign for tagging, more clear for LLM
user.replaceWith("@" + _get_user(user_id, confluence_client))
return format_document_soup(soup)