mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-02 02:01:47 +00:00
fix(cli): keep snake_case underscores intact in strip markdown mode
This commit is contained in:
parent
b2111a2b45
commit
aa61831a14
4 changed files with 36 additions and 5 deletions
|
|
@ -25,9 +25,9 @@ const renderEstimateLine = (line: string) => {
|
|||
.replace(/\[(.+?)\]\((https?:\/\/[^\s)]+)\)/g, '$1')
|
||||
.replace(/`([^`]+)`/g, '$1')
|
||||
.replace(/\*\*(.+?)\*\*/g, '$1')
|
||||
.replace(/__(.+?)__/g, '$1')
|
||||
.replace(/(?<!\w)__(.+?)__(?!\w)/g, '$1')
|
||||
.replace(/\*(.+?)\*/g, '$1')
|
||||
.replace(/_(.+?)_/g, '$1')
|
||||
.replace(/(?<!\w)_(.+?)_(?!\w)/g, '$1')
|
||||
.replace(/~~(.+?)~~/g, '$1')
|
||||
.replace(/==(.+?)==/g, '$1')
|
||||
.replace(/\[\^([^\]]+)\]/g, '[$1]')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue