@labelbee/lb-components 1.24.0-alpha.42 → 1.24.0-alpha.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/utils/LLM.d.ts +2 -2
- package/dist/utils/LLM.js +1 -1
- package/es/utils/LLM.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 将 LaTeX 数学公式从 \(...\) 格式转换为 $...$
|
|
2
|
+
* 将 LaTeX 数学公式从 \(...\) 格式转换为 $...$ 格式,以及 \[...\] 格式转换为 $$...$$格式
|
|
3
3
|
* @param latexContent - 包含 LaTeX 数学公式的原始字符串
|
|
4
|
-
* @returns
|
|
4
|
+
* @returns 转换后的字符串,其中行内公式使用 $...$ 格式,行间公式使用 $$...$$ 格式
|
|
5
5
|
*/
|
|
6
6
|
export declare const convertLatexFormat: (latexContent: string) => string;
|
package/dist/utils/LLM.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const convertLatexFormat=r=>{try{return r.replace(/\\\((
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const convertLatexFormat=r=>{try{return r.replace(/\\\((.+?)\\\)/gs,(o,e)=>`$${e}$`).replace(/\\\[(.+?)\\\]/gs,(o,e)=>`$$${e}$$`)}catch(t){return r}};exports.convertLatexFormat=convertLatexFormat;
|
package/es/utils/LLM.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t=r=>{try{return r.replace(/\\\((.+?)\\\)/gs,(o,e)=>`$${e}$`).replace(/\\\[(.+?)\\\]/gs,(o,e)=>`$$${e}$$`)}catch(n){return r}};export{t as convertLatexFormat};
|