Skip to content

Commit

Permalink
feat: 优化单行大文本的判定逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsonliu committed Dec 18, 2024
1 parent dc3306e commit 2b5d8fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/regexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ export const imgBase64Reg = /(\[[^\n]*?\]\(data:image\/[a-z]{1,10};base64,)([^)]
// 匹配base64数据
export const base64Reg = /(data:image\/[a-z]{1,10};base64,)([0-9a-zA-Z+/]+)/g;

// 匹配内容非常多的单行文本
export const longTextReg = /([^\n]{100})([^\n]{5900,})/g;
// 匹配内容非常多的单行文本,为了避免表格的场景,所以特意避免表格的识别
export const longTextReg = /([^\n]{100})([^\n|`\s]{5900,})/g;

// 匹配图片{}里的data-xml属性
export const imgDrawioXmlReg = /(!\[[^\n]*?\]\([^)]+\)\{[^}]* data-xml=)([^}]+)\}/g;
Expand Down

0 comments on commit 2b5d8fc

Please sign in to comment.