Skip to content

Commit

Permalink
fix: 处理图片base64和base64数据正则替换冲突的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsonliu committed Dec 18, 2024
1 parent cdd7cf4 commit dc3306e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import NestedError, { $expectTarget, $expectInherit, $expectInstance } from './u
import CryptoJS from 'crypto-js';
import SyntaxBase from './core/SyntaxBase';
import ParagraphBase from './core/ParagraphBase';
import { PUNCTUATION, longTextReg, base64Reg, imgBase64Reg, imgDrawioXmlReg } from './utils/regexp';
import { PUNCTUATION, longTextReg, imgBase64Reg, imgDrawioXmlReg } from './utils/regexp';
import { escapeHTMLSpecialChar } from './utils/sanitize';
import Logger from './Logger';
import { configureMathJax } from './utils/mathjax';
Expand Down Expand Up @@ -252,11 +252,6 @@ export default class Engine {
this.cachedBigData[cacheKey] = m2;
return `${m1}${cacheKey}}`;
});
$md = $md.replace(base64Reg, (whole, m1, m2) => {
const cacheKey = `bigDataBegin${this.hash(m2)}bigDataEnd`;
this.cachedBigData[cacheKey] = m2;
return `${m1}${cacheKey}}`;
});
$md = $md.replace(longTextReg, (whole, m1, m2) => {
const cacheKey = `bigDataBegin${this.hash(m2)}bigDataEnd`;
this.cachedBigData[cacheKey] = m2;
Expand Down

0 comments on commit dc3306e

Please sign in to comment.