chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -21,8 +21,8 @@ export const transSliceContentOutput = (
ignoreImg = false,
): string => {
/**
* 1. 处理img标签
* 2. 删除多余的div/span/br标签
* 1. Handling img tags
* 2. Remove redundant div/span/br tags
*/
const imgPattern = /<img.*?(?:>|\/>)/gi;
const divSPattern = /<div[^>]*>/g;
@@ -60,10 +60,10 @@ export const transSliceContentInput = (content: string): string => {
};
export const transSliceContentInputWithSave = (content: string) => {
// <br> 替换成 \n
// Replace < br > with\ n
const contentWithNewLine = content.replace(/<br>/g, '\n');
// <span> 替换为空
// Replace < span > with empty
const finalContent = contentWithNewLine
.replace(/<span>/g, '')
.replace(/<\/span>/g, '');